Professional Documents
Culture Documents
18CPL17 27 Viva Questions
18CPL17 27 Viva Questions
2. What is Algorithms?
An algorithm refers to the step by step instructions written to solve any problem.
3. What is Flowchart?
A flowchart is a diagrammatic or symbolic representation of algorithms. It uses various symbols to
represent the operations to be performed.
8. What are the maximum and minimum possible ranges of values for long and short type?
If the int variable is created by default as a „long‟ type it typically will have a possible range of
values from a maximum of +214748347 and a minimum of -2147483648. For „short‟ type these are the
maximum and minimum values +327676 and minimum -32768.
(While answering this question you can specify the approximate value raised to power).
9. What is preprocessor?
31. How does the type float differ from double in C language?
Float data type refers real number in single precision and has 6 decimal digits. It takes 4 bytes in
memory to refer values ranging from 3.4e-38 to 3.4e+38
double data type also refers to real number but in double precision and has 12 decimal digits. It
takes 8 bytes of memory to refer values ranging from 1.7e-308 to 1.7e+308
55. Not all reserved words are written in lowercase. TRUE or FALSE?
FALSE. All reserved words must be written in lowercase; otherwise the C compiler would
interpret this as unidentified and invalid.
56. What is the difference between the expression “++a” and “a++”?
In the first expression, the increment would happen first on variable a, and the resulting value will be the
one to be used. This is also known as a prefix increment. In the second expression, the current value of
variable a would the one to be used in an operation, before the value of a itself is incremented. This is
also known as postfix increment.
70. What are macros? What are its advantages and disadvantages?
Macros are abbreviations for lengthy and frequently used statements. When a macro is called the
entire code is substituted by a single line though the macro definition is of several lines. The advantage
of macro is that it reduces the time taken for control transfer as in case of function. The disadvantage of
it is here the entire code is substituted so the program becomes lengthy if a macro is called several times.