Pr.Pg Next Pg

C Programming Interview Questions and Answers Part 4


31.What are the types of macro formats?

  • There are two types of macro formats. There are

    1. Simple

    2. Parameterized

32.What are the different types of errors?

  • Compile–Time Errors

  • Linker Errors

  • Runtime Errors

  • Logical Errors


33.What is meant by errors and debugging?

  • Errors may be made during program creation even by experienced programmers.

  • Such type of errors are detected by the compiler.
    Debugging means removing the errors.


34.What is the purpose of main() function?

  • The function main() invokes other functions within it.It is the first function to be called when the program starts execution.

  • It is the starting function.

  • It returns an int value to the environment that called the program.

  • Recursive call is allowed for main( ) also.

  • It is a user-defined function.


35.What is meant by type casting?

  • It is the explicit type conversion required for a number before carrying out processing or assigning to another variable.


36.What are the primitive data types in c?

  • There are five different kinds of data types in C.

    1. char

    2. int

    3. float

    4. double

    5. void

37.What is the use of typedef?

  • The typedef help in easier modification when the programs are ported to another machine

  • .A descriptive new name given to the existing data type may be easier to understand the code.


38.What is meant by type specifiers?

  • Type specifiers decide the amount of memory space occupied by a variable. In the ease of integral types; it also explicitly states the range of values that the object can hold.


39.What are the types of type specifiers?

  • The available data type specifiers are :

    1. short

    2. long

    3. signed

    4. unsigned

40.What is masking?

  • Masking is a process in which a given bit pattern is partly extracted into another bit pattern by means of a logical bitwise operation.

Pr.Pg border                                              Next Pg