How do you convert decimal number 147 to binary?
First convert 37 in to decimal.
(3*8^1)+(7*8^0)=31.
Then convert it to binary.
2|31|
2|15---1
2 |7-----1
2|3------1
2|1-----1
so answer is in binary =(11111)
Or, by digits: 3->011, 7->111; 37->011111
Why you use constreamh in c plus plus?
There is no such header in C++. You must consult the documentation provided with the file. It is most likely related to console input/output, perhaps providing enhancements to the standard I/O stream implementation.
In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[1][2]
Different kinds of data structures are suited to different kinds of applications, and some are highly specialized to specific tasks. For example, B-trees are particularly well-suited for implementation of databases, while compiler implementations usually use hash tables to look up identifiers.
Data structures are used in almost every program or software system. Specific data structures are essential ingredients of many efficient algorithms, and make possible the management of huge amounts of data, such as large databases and internet indexing services. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design
This smells like homework, so I'll only give you pseudo-code:
decimal returnLargest(decimal a, decimal b)
is a > b ? then, return a, else, return b;
Why c and java arrays are start with zero and pascal arrays are start with one?
It's a difference in mentality; some believe 0 is the begin, and is thus the only logical choice, and some think the opposite.
It depends on whether the data entry is predominantly alphanumeric or numeric. Alphanumeric entry is measured in WPM (words-per-minute) and usually requires a minimum of 60 to 80 WPM however a top-flight secretary can easily exceed 100 WPM. Numeric entry is measured in KPH (keystrokes-per-hour) and usually requires a minimum of around 8,000 to 9,000 KPH. Hardcore data entry requires a minimum of 10,000 KPH while a top-flight number cruncher can easily exceed 12,000 KPH.
How can you read and write to files in C programming language?
We can read and write to files with the help of file commands in c programming.There are so many commands related to file for read,write,append,delete etc.
How can you compare precedence of operators in programming of conversion of infix to postfix?
Each operator has a certain precedence level, usually some numeric value. As you parse the expression, you compare the precedence of each operator with the precedence of the last operator, and you either generate code or you push the operator and its operand(s) on two stacks.
First argument of fwrite function is typecast to?
void *
wlen= fwrite ((void *)&data, 1, sizeof (data), file);
if (wlen != sizeof (data)) ... error ...
Can you give me an example of source code using gotoxy and Microsoft visual basic c plus plus 2006?
can you help me create a program that will have the following output:
[1] Volume of Ellipsoid
[2] Volume of Prolate Spheroid
[3] Surface Area of Prolate Spheroid
[4] Volume of Oblate Spheroid
[5] Surface Area of Oblate Spheroid
[6] Surface Area of Spherical Triangle
Enter Your Choice:
You have chosen:
Enter Side a:
Enter Side b:
Enter Side c:
Volume =
Do you want to try again? [Y/N]
...
it must use gotoxy and clear screen after choosing Y or N ( in do you want to try again)
it must be used in Microsoft visual basic c++ 2006,,
here are the following formulas;;
Volume of Ellipsoid = (4/3)*3.14*a*b*c
( input a,b,c)
Volume of Prolate Spheroid = (4/3)*3.14*a*(pow(b,2))
(input a,b)
Surface Area of Prolate Spheroid = 2*3.14*b*L
(input b,L)
Volume of Oblate Spheroid = (4/3)*3.14*(pow(a,2))*b
Surface Area of Oblate Spheroid = 2*3.14*a*y
where:
y = a+(number/denom)
number = pow(b,2)
denom = 2(sqrt(pow(a,2)-pow(b,2))
(input a,b)
Surface of Spherical Triangle = ( A+B+C-3.14)*pow(r,2)
(input A,B,C,r)
Where headers files are generally stored?
It depends on the header file and on the general organization of the project.
System header files, such as stdio.h or windows.h, are stored in a directory that the compiler knows about, but that you don't need to even think about.
Library header files are either stored in the same place that system header files are stored, or they are stored in a place reserved for the particular library. In the latter case, there will usually be build parameters that identify the header files and their associated library files.
User header files are either stored in the same directory as the source files, or they can be stored in a related directory, somewhere in the project directory tree.
well in most of the DOS/Windows C/C++ compilers predefined header files are stored in INCLUDE directory of the folder containing the compiler
How do you enable scroll bar in c language in normal environment?
Platform-dependent, GUI is not part of the standard C libraries.
Why c plus plus compiler cannot produce byte code?
Byte code would be detrimental to performance because byte code must run in a virtual machine. Java compiles to byte code suitable for the Java Virtual Machine (JVM), but C++ compiles to native machine code. For that reason alone, C++ programs perform many times better than equivalent Java programs. However, the need for a virtual machine also means Java is highly-abstract, with no direct access to specific architecture features. C++ has no such limitations and can therefore produce highly-efficient code specific to any platform. Java simply cannot compete for performance, but Java programs need only be compiled once to run on any platform that supports the JVM, whereas C++ must be compiled separately for each platform, and preprocessor directive code must be written to suit each supported platform. This naturally requires a lot more work on the part of the programmer, but the performance speaks for itself.
What is the difference between datatypes and modifiers in c language?
For example 'int' is a data-type, 'short', 'long', 'signed' and 'unsigned' are modifiers, 'extern', 'auto', 'static', 'register' are storage-classes.
The declarations go like this:
storage-class modifiers data-type identifier
example:
static unsigned short int x;
What data type will you use to declare a variable to store population on earth?
Since the population of the Earth is around 7 billion (short scale), I would use either a long long integer that was 64 bits in length (if available) that would give me 18 digits of precision, or a double precision floating type that would give me 15 digits of precision.
Why linked list is called as linear data structure?
Lookup time for an element in a link list is equal to number of elements in list. Hence linear, like a linear equation: t = n. Compare that to lookup in a tree which is logarithmic: t = log2 n.
What is abstract data type in c plus plus?
Abstract data types are the opposite of a concrete data types. An abstract data type is one that does not contain all of the function code necessary to create an instance of the object. This design allows subclasses to implement the abstract functions while inheriting the non-abstract functions of the class. A pointer to an abstract instance can call all the abstract functions of that object, which will defer their execution to the actual concrete data type's implementation of that function. As a simple example, an abstract class ChessPiece might have a function called move(). A Pawn subclass would behave differently than a Queen would, but both could be called by outside code without knowing (or caring) about what type of ChessPiece is moving.
CorrectionAbstract classes can provide a full and complete (if generic) implementation for all of their pure-virtual functions. It is not the lack of a complete implementation that renders them abstract, but the fact the methods were declared pure-virtual and therefore cannot be inherited. However, derived classes can still call those implementations from within their own implementations.
Furthermore, derived classes that do not provide implementations for all the pure-virtual methods become abstract base classes themselves. But the pure-virtual methods that they do implement can then be inherited through multi-level inheritance.
Non-inheritance of pure-virtual methods only applies to the class that initially declared the method as pure-virtual. Provided an implementation is declared protected or public within a derived class, that implementation can then be inherited by a concrete class, or it can be overridden if required.
When printing text through a string, \t can be used to produce a horizontal tab. The same can also be used when parsing input.
Within the C language source code, a tab is considered a white space and ignored outside string constants, provided that it does not break a keyword into two parts.
What secondary type of data is used in econometric models?
Economic forecasting models predominantly use time-series data, where the values of the variables change over time.
Can array size be increased ones its defined?
Yes but only if it is defined as a pointer and memory is dynamically assigned to the pointer.
How do you convert hexadecimal number FC to Decimal?
FC(16) = value_of(F)*16 + value_of(C) = 15*16+12 = 252
What is preorder in tree in c?
There is no such thing. You can traverse a binary tree in pre-order though: first the root, then the left sub-tree, finally the right sub-tree.