Structures


  1. Presence of code like “s.t.b = 100” indicates __________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Structure


  1. Which of the following operation is illegal in structures?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Typecasting of structure



  1. Which of the following is not possible under any scenario?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    n1 = n2; or (*n1).number = 10; and n1 = &n2; are not possible under any scenario.


  1. What will be the output of the following C code?
    #include <stdio.h>
    struct test
    {
    int num;
    } t;
    void func(struct test t)
    {
    t.num = 125;
    printf("%d ", t.num);
    }
    main()
    {
    func(t);
    printf("%d ", t.num);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    125 0



  1. Which of the following return-type cannot be used for a function in C?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    struct, void and char * return-type cannot be used for a function in C.