C Programming and Technical Programming Definition

Q. What is storage class? What are the different storage classes in C?

A. 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

Read Solution (Total 0)

C Other Question

Q. Difference between strdup and strcpy?

A. Both copy a string. strcpy wants a buffer to copy into. strdup allocates a buffer using malloc(). Unlike strcpy(), strdup() is not specified by ANSI
Q. What are the uses of a pointer?

A.
(i)It is used to access array elements
(ii)It is used for dynamic memory allocation.
(iii)It is used in Call by reference
(iv)It is used in data structures like trees, graph, linked list etc.