1. Question:What are enumerations? 

    Answer
    They are a list of named integer-valued constants. Example:enum color { black , orange=4,yellow, green, blue, violet };This declaration defines the symbols “black”, “orange”, “yellow”, etc. to have the values “1,” “4,” “5,” … etc. The difference between an enumeration and a macro is that the enum actually declares a type, and therefore can be type checked.

    1. Report
  2. Question:Are pointers integer? 

    Answer
    No, pointers are not integers. A pointer is an address. It is a positive number.

    1. Report
  3. Question:What is static memory allocation? 

    Answer
    Compiler allocates memory space for a declared variable. By using the address of operator, the reserved address is obtained and this address is assigned to a pointer variable. This way of assigning pointer value to a pointer variable at compilation time is known as static memory allocation.

    1. Report
  4. Question:What is dynamic memory allocation? 

    Answer
    A dynamic memory allocation uses functions such as malloc() or calloc() to get memory dynamically. If these functions are used to get memory dynamically and the values returned by these function are assigned to pointer variables, such a way of allocating memory at run time is known as dynamic memory allocation.

    1. Report
  5. Question:What is a function? 

    Answer
    A large program is subdivided into a number of smaller programs or subprograms. Each subprogram specifies one or more actions to be performed for the larger program. Such sub programs are called functions.

    1. Report
  6. Question:What are C tokens? 

    Answer
    There are six classes of tokens: identifier, keywords, constants, string literals, operators and other separators.

    1. Report
  7. Question:What are C identifiers? 

    Answer
    These are names given to various programming element such as variables, function, arrays.It is a combination of letter, digit and underscore.It should begin with letter. Backspace is not allowed.

    1. Report
  8. Question:Difference between syntax vs logical error? 

    Answer
    Syntax Error
    These involves validation of syntax of language.
    compiler prints diagnostic message.Logical Error
    logical error are caused by an incorrect algorithm or by a statement mistyped in such a way that it doesn’t violet syntax of language.
    difficult to find.

    1. Report
  9. Question:What do the functions atoi(), itoa() and gcvt() do? 

    Answer
    atoi() is a macro that converts integer to character.
    itoa() It converts an integer to string
    gcvt() It converts a floating point number to string

    1. Report
  10. Question:What is FILE? 

    Answer
    FILE is a predefined data type. It is defined in stdio.h file.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd