C- Declarations and Initializations Questions and Answers
Understanding C Declarations and Initializations is fundamental for mastering C programming. These concepts are frequently covered in programming questions and answers for placement tests and technical interviews at companies like TCS, Infosys, and Wipro. Declarations define variables, while initializations assign values to them, both ensuring efficient memory and data handling in C. This guide provides C programming MCQs and practical examples that clarify variable scope, storage classes, and initialization rules. Ideal for both beginners and job seekers, it strengthens your coding logic and interview readiness with real-world examples and practice problems.
C- Declarations and Initializations
Showing 10 of
49 questions
31. What is the size of an int data type in C?
- 2 bytes
- 4 bytes
- 8 bytes
- Depends on compiler
34. Which of the following is a valid declaration?
- int arr[0];
- int arr[];
- int arr[5];
- int arr[-5];
35. What does the "volatile" keyword indicate?
- Variable cannot be changed
- Variable is optimized
- Variable may change unexpectedly
- Variable is constant
38. Which is correct for declaring a pointer?
- int ptr*;
- int *ptr;
- *int ptr;
- int pointer;
39. What is the maximum length of a C identifier?
- 31 characters
- 63 characters
- 79 characters
- 255 characters