C Language Interview Question and Answers
16. |
What is a macro? |
|
Macros are the identifiers that represent statements or expressions. To associate meaningful identifiers with constants, keywords, and statements or expressions. |
|
Anjali,says |
Mar 27, 2014 |
When in a program we include certain instructions many times and if we like to provide any update to it we can use macro instruction.
|
|
17. |
What is arrays? |
|
Array is a variable that hold multiple elements which has the same data type. |
|
Soumyarup ghosh, says |
Apr 10, 2014 |
An array is a collection of homogeneous elements arranged in contiguous memory locations. The space allocated for an array is fixed , it cant be altered later, so if the memory allocated for an arry is not utilised, then it is wasted, an array declaration is datatype arrayname [size ]; |
|
18. |
What is the difference between #include‹ › and #include “ ”? |
|
- #include‹ ›
Specifically used for built in header files. - #include “ ”
Specifically used for used for user defined/created n header file.
|
|
|
19. |
What are the advantages of the functions? |
|
- It reduces the Complexity in a program by reducing the code.
- Function are easily understanding and reliability and execution is faster.
- It also reduces the Time to run a program.In other way, Its directly proportional to Complexity.
- Its easy to find-out the errors due to the blocks made as function definition outside the main function.
|
|
|
20. |
How do declare an array? |
|
We can declare an array by specify its data type, name and the number of elements the array holds between square brackets immediately following the array name. syntax : data_type array_name[size]; |
|
|