Differentiate Between RAM and RO1
Differentiate Between RAM and RO1
ROM It is a non-volatile memory The content are permanent Available in high storage capacity Processor speed is low Cost effective Generally the operating system supporting programs can be stored RAM It is a volatile memory The content are temporary Available in small storage capacity Processor speed is high Cost is very high User defined program can be stored at any time
Convert the octal number (127.46)8 to Decimal number. (127.46)8 -> 1 * 82+2*81+7*80+4*8-1+6*8-2 1. 64 + 16 + 7 + 0.5 + 0.093 2. (87.5939) 10 What are keywords? Keywords are certain reserved words that have standard and pre-defined meaning in C. These keywords can be used only for their intended purpose. Define single character input getch ( ) function? The getch ( ) function is written in standard I/O library. It reads a single character from a standard input device. This function does not require any arguments, through a pair of empty parenthesis, must follow the statement getch ( ). Define enumerated data types. The ANSI providesuser defined data type which is called enumerated data type. i.e, the programmer can create their own data type & define what values the variables of these data types can hold. It is defined as follows, Syntax: Enum tagname { enum 1; enum 2; .. .. enum n; }; What is a multidimensional array? The collection of data items can be stored under a one variable name using three or more subscript, such a variable is called multidimensional array. Ex: int a[3] [3] [3]:
Define recursion? Recursion is a process by which a function calls itself repeatedly, until some specified condition has been satisfied. The process is used for repetitive computations in which each action is stated in terms of a previous result. Many iterative (i.e. repetitive) problems can be written in this form. List some library functions? sqrt(x) log(x) abs(x) fabs(x) exp(x) pow(x,y)
Differentiate Union and structure Union All the members of union share the same location Key word union is used here Memory allocation is done for Structure Each member is allocated their own memory Here struct keyword is used Memory allocation is done for the data which requires maximum
all the data members in the member structures. Example. struct student { int rollno; char name[5]; }s1; allocations. Example:
The memory allocation is 7 The memory allocation is 5 Bytes Bytes. All the data members are Only the last stored data element is available memory execution. Since memory is allocated for Since memory is not allocated for all the all the data members, no data data member, only one data is available and is deleted in the primary other data is deleted from the primary memory memory in at the any primary available in the primary memory at any time of time of execution.
What is meant by pre processor? The preprocessor is a program that processes the source program before it is passed on to the compile. Any preprocessor directive starts with #. The major pre-processor directives are: 1. File Inclusion directive 2. Macro Substitution.