LANGUAGES | C | C LANGUAGE INTERVIEW QUESTION AND ANSWERS | 15

Language C Interview

C Language Interview Question and Answers:

71. In C, why is the void pointer useful? When would you use it?
                The void pointer is useful because it is a generic pointer that any pointer can be cast into and back again without loss of information.

72. What is storage class? What are the different storage classes in C?
                Storage class is an attribute that changes the behavior of a variable. It controls the lifetime,scope and linkage. The storage classes in c are auto, register, and extern, static, typedef.

73. What is the difference between Strings and Arrays?
                String is a sequence of characters ending with NULL .it can be treated as a one dimensional array of characters terminated by a NULL character.

74. What is a huge pointer?
                Huge pointer is 32bit long containing segment address and offset address. Huge pointers are normalized pointers so for any given memory address there is only one possible huge address segment : offset pair. Huge pointer arithmetic is doe with calls to special subroutines so its arithmetic slower than any other pointers.

75. What the advantages of using Unions?
                When the C compiler is allocating memory for unions it will always reserve enough room for the largest member.

No comments:

Post a Comment