1. Question: What is the correct value to return to the operating system upon the successful completion of a program?

    A
    -1

    B
    1

    C
    0

    D
    Programs do not return a value.

    Note: Not available
    1. Report
  2. Question: What is the only function all C programs must contain?

    A
    start()

    B
    start()

    C
    main()

    D
    program()

    Note: Not available
    1. Report
  3. Question: What punctuation is used to signal the beginning and end of code blocks?

    A
    { }

    B
    -> and <-

    C
    BEGIN and END

    D
    ( and )

    Note: Not available
    1. Report
  4. Question: What punctuation ends most lines of C code?

    A
    .

    B
    ;

    C
    :

    D
    '

    Note: Not available
    1. Report
  5. Question: Which of the following is a correct comment?

    A
    */ Comments */

    B
    ** Comment *

    C
    /* Comment */

    D
    { Comment }

    Note: Not available
    1. Report
  6. Question: C can run on which of the following environments?

    A
    DOS

    B
    Windows

    C
    Linux

    D
    All

    Note: Not available
    1. Report
  7. Question: What are the types of linkages?

    A
    Internal and External

    B
    External, Internal and None

    C
    External and None

    D
    Internal

    Note: External Linkage-> means global, non-static variables and functions. Internal Linkage-> means static variables and functions with file scope. None Linkage-> means Local variables.
    1. Report
  8. Question: Is the following statement a declaration or definition? extern int i;

    A
    Declaration

    B
    Definition

    C
    Function

    D
    Error

    Note: Declaring is the way a programmer tells the compiler to expect a particular type, be it a variable, class/struct/union type, a function type (prototype) or a particular object instance. (ie. extern int i) Declaration never reserves any space for the variable or instance in the program's memory; it simply a "hint" to the compiler that a use of the variable or instance is expected in the program. This hinting is technically called "forward reference".
    1. Report
  9. Question: Identify which of the following are declarations 1 : extern int x; 2 : float square ( float x ) { ... } 3 : double pow(double, double);

    A
    1

    B
    2

    C
    1 and 3

    D
    2

    Note: extern int x; - is an external variable declaration. double pow(double, double); - is a function prototype declaration. Therefore, 1 and 3 are declarations. 2 is definition.
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd