C Programming Questions Answers - Chapter 1

  • 15. Out of following program :
    float x = 10.7;
    int i;

    i = (int) x;
    print i;

    1. null
    2. error
    3. 10
    4. garbage value
    Answer :

    Option C

  • 16. total number of keywords in C are

    1. 30
    2. 32
    3. 48
    4. 132
    Answer :

    Option B

  • 17. What is use of \r in c

    1. used to insert a vertical tab
    2. used to insert a tab
    3. places cursor at the end of line
    4. places cursor at the start of line
    Answer :

    Option D

  • 18. UML meaning is

    1. Unique modeling language
    2. Unified modeling language
    3. Unified modern language
    4. Unified master laqnguage
    Answer :

    Option B

  • 19. What is dangling pointer in c

    1. if pointer is pointing to a memory location from where variable has been deleted
    2. if pointer is assigned to more than one variable
    3. if pointer is not defined properly
    4. none of above
    Answer :

    Option A

  • 20. Due to variable scope in c

    1. Variables created in a function cannot be used another function
    2. Variables created in a function can be used in another function
    3. Variables created in a function can only be used in the main function
    4. None of above
    Answer :

    Option A

  • 21. What will be the output of following program
    #include
    main()
    {
    int x,y = 10;
    x = y * NULL;
    printf(\"%d\",x);
    }

    1. error
    2. 0
    3. 10
    4. Garbage value
    Answer :

    Option B

Please Like Us