0% found this document useful (0 votes)
21 views

C Programming

The document lists 55 questions about C programming theory concepts including data types, operators, functions, memory management, and more. Some key topics covered are the differences between declarations and definitions, primitive types, type qualifiers, dynamic memory allocation, file streams, pre-processing, conditional compilation, scopes, lifetimes, pointers, structures, unions, and function prototypes.

Uploaded by

Kartik Naik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

C Programming

The document lists 55 questions about C programming theory concepts including data types, operators, functions, memory management, and more. Some key topics covered are the differences between declarations and definitions, primitive types, type qualifiers, dynamic memory allocation, file streams, pre-processing, conditional compilation, scopes, lifetimes, pointers, structures, unions, and function prototypes.

Uploaded by

Kartik Naik
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

C-Programming Theory Questions

1. What are the two types of source files in C


2. What are basic kinds of errors that occur while compiling and running C programs?
3. What is the difference between a ‘declaration’ and a ‘definition’?
4. What are types casts’? What are two main types of casts?
5. What are primitive types? What are the primitive types in C?
6. If not initialised explicitly, what are the default initialisation values for (a) global variables (b) static
variables, (c) local variables?
7. What are ‘type qualifiers’?
8. What are floating point types? What are floating point types available in C?
9. What is an enumeration (enum) type?
10. What is a ‘pointer’ type?
11. What are ‘aggregate types’?
12. What are the two important functions used for dynamic memory allocation?
13. What are the file streams that are automatically opened when a C program is executed?
14. What is the functionality provided by a C pre-processor?
15. What are the bit-wise operators in C?
16. What are logical operators in C?
17. What is the use of assert macros provided in <assert.h> header file?
18. What are the argument passing mechanisms supported in C?
19. What is a variable length argument list? When do you use variable length arguments?
20. What is the use of calloc function in C? Why will we need to use it?
21. What is ‘conditional compilation?
22. What is the significance of the main( ) function in C?
23. What do we mean by ‘scope’ of a variable? What are three important scopes in C?
24. What do you mean by the ‘lifetime’ of a variable? What are three important lifetimes in C?
25. What are ‘type specifiers’?
26. What are ‘read-only’ variables?
27. What is the most efficient type to use in C and why?
28. What is the use of ‘static’ keyword?
29. What is the meaning and use of ‘extern’ keyword?
30. What is the use of ‘struct’?
31. What is the use of ‘union’ keyword?
32. Are the member access operators. (dot) and → operators equivalent?
33. What is the meaning and use of ‘size of’ operator?
34. What are the main differences between the macros and functions?

1
35. What is the meaning and use of ‘register’ keyword?
36. What is the meaning and use of ‘type of’?
37. Which is the only ‘compile-time’ operator in C?
38. What is the difference between memcpy and memmove functions?
39. Which operator in C can result in ‘divide by zero’ error other than the/operator?
40. In C, why is that arrays are low-level in nature, compared to the support of strings in other languages
(like Java or Pascal)?
41. Give some examples of cases/situations where volatile keyword is needed.
42. What do you mean by pointer arithmetic and how is it different from ordinary (usual) arithmetic?
43. What is the ‘clockwise rule’ for reading/understanding complex declarations in C?
44. Describe the following prototype for signal function (provided in <signal.h> in standard C library)
45. What are important memory areas in a C program under execution? Briefly explain the purpose of each
of these areas.
46. What is a function prototype and why is/it necessary?
47. What is a function pointer and how to you initialise and use a function pointer?
48. What is the difference between pre-increment and post-increment operators?
49. What is a declaratory and what is its significance?
50. What is the difference between the following typedef’s and #define’s in the two set of statement below?
51. What is the difference between ‘char arr[ ]’ and ‘char * arr’?
52. What is a NULL pointer?
53. What is a memory leak?
54. What is the problem with the following code segment?
55. After the calls to the following fseek function, what will be the position of the file marker?

💧💧💧💧

You might also like