Storage Classes


  1. calloc() initialize memory with all bits set to zero.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    True


  1. What if size is zero in the following C statement?
    realloc(ptr, size)











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Free the memory pointed to by ptr



  1. Which of the following storage class supports char data type?











  1. View Hint View Answer Discuss in Forum

    char data type is supported by all storage classes i.e. auto, register and static.

    Correct Option: D

    char data type is supported by all storage classes i.e. auto, register and static.


  1. What will be the output of the program:-
    extern int i = 5;
    main()
    (
    int i=7;
    printf("%d",i);
    }
    









  1. View Hint View Answer Discuss in Forum

    variable declared with extern keyword has scope throughout the file, it is a global variable.
    variable declared within the function is local to the function in which it is declared.

    Correct Option: C

    printf function prints value of i, which is local to the function in which it is declared.