C - Elements of C Language Questions and Answers
The Elements of C Language questions with answers cover the fundamental building blocks of C programming, including variables, data types, operators, and control structures. These programming questions and answers are ideal for beginners aiming to strengthen their coding foundation. Each question is designed to test conceptual clarity and coding accuracy, commonly seen in TCS, Wipro, and Infosys placement exams. With explanations and examples, these MCQs help learners prepare effectively for both academic tests and real-world programming challenges.
C - Elements of C Language
Showing 10 of
58 questions
41. Identify the correct statement .
- The variable names VOLUME and volume are identical
- The variable names Sum andsum are identical.
- Variables are not declared before use.
- Variable names may be absent in a declaration.
43. Which is the most appropriate variable initialization ?
- # define MAX 100
- int x, y; y = 15
- float y = 2.14;
- char c;c = 'O' ;
46. Identify the worng declaration.
- int n = {7}
- char c2 = 'A' + 25, cl = 'Z';
- int x ; y ;
- int x = 10, y = x * 20, year;
47. Identify the wrong sentence.
- # define isa preprocessor facility.
- # define aids in modifying a constant value throughout the program.
- # define uses a statement terminator.
- # define improves the readabilitty of the program.
48. What is avariable declaration ?
- The assignment of propertiesto a variable.
- Theassignment of memory space to a variable.
- The assignment of properties and memory space to a variable.
- The assignment of properties and indentification to a variable.
49. What are strings ?
- They are contiguous blocks of characters and a terminating NUL.
- They are individual characters linked together to form a string.
- Both options (a) and (b)
- None of the above.
50. In addition to the length of the string, whatmust be considered while determining the minimum number of characters required to store a C strings ?
- An EOF at the end must be considered.
- A '\0' at the end must be considered.
- Apart from the string itself, there is nothing else tobe considered when determining the length of the string.
- A '\0\n' at the end must be considered.