Podcast
Questions and Answers
Who is recognized as the developer of the C language?
Who is recognized as the developer of the C language?
- Peter Norton
- Ken Thompson
- Dennis Richie (correct)
- Bill Gates
In which year was the C programming language originally developed?
In which year was the C programming language originally developed?
- 1976
- 1970
- 1972 (correct)
- 1980
What level of programming language is C considered to be?
What level of programming language is C considered to be?
- High level
- Middle level (correct)
- Machine level
- Low level
Which symbol is used to indicate a pre-processor statement in C?
Which symbol is used to indicate a pre-processor statement in C?
Which data type is considered a scalar data type in C?
Which data type is considered a scalar data type in C?
What is the valid range of the 'int' data type in C?
What is the valid range of the 'int' data type in C?
Which escape sequence character is used as a line terminator in C?
Which escape sequence character is used as a line terminator in C?
Character constants in C should be enclosed within which type of quotes?
Character constants in C should be enclosed within which type of quotes?
What is the maximum size of a 'double' variable?
What is the maximum size of a 'double' variable?
How much memory does the declaration of 'float a; double b;' occupy?
How much memory does the declaration of 'float a; double b;' occupy?
Which of the following expressions correctly demonstrates a compounded assignment statement?
Which of the following expressions correctly demonstrates a compounded assignment statement?
What operation does the '&&' operator perform?
What operation does the '&&' operator perform?
Which operator is used for bitwise AND?
Which operator is used for bitwise AND?
What symbol represents the equality operator?
What symbol represents the equality operator?
What does operator precedence determine?
What does operator precedence determine?
What does integer division result in?
What does integer division result in?
What does 'a += 4' mean?
What does 'a += 4' mean?
Which statement about C Library functions is correct?
Which statement about C Library functions is correct?
Which pair of functions is used for single character I/O?
Which pair of functions is used for single character I/O?
What value does printf() return when an error occurs?
What value does printf() return when an error occurs?
What does an ampersand in scanf() before a variable name denote?
What does an ampersand in scanf() before a variable name denote?
Which option correctly defines symbolic constants?
Which option correctly defines symbolic constants?
Which header file is essential for using the strcmp() function?
Which header file is essential for using the strcmp() function?
Which option represents the null character?
Which option represents the null character?
How many keywords are available in C?
How many keywords are available in C?
What represents a character in the C language?
What represents a character in the C language?
What is the maximum number of elements in the declaration 'int arr;'?
What is the maximum number of elements in the declaration 'int arr;'?
Which of the following statements will not terminate with a semicolon?
Which of the following statements will not terminate with a semicolon?
Which of the following is an unconditional control structure?
Which of the following is an unconditional control structure?
What will be the output of the printf(“%.2f
”,17.23478)?
What will be the output of the printf(“%.2f ”,17.23478)?
Which of the following options represents the correct way to declare a pointer?
Which of the following options represents the correct way to declare a pointer?
The number of arithmetic operators in C language is:
The number of arithmetic operators in C language is:
What will be the value of 'x' after executing the statement 'x=y+z' where 'y=10' and 'z' is a character with value 'a'?
What will be the value of 'x' after executing the statement 'x=y+z' where 'y=10' and 'z' is a character with value 'a'?
What will be the output of the given C program that includes multiple assignment operations?
What will be the output of the given C program that includes multiple assignment operations?
What will the output be for the provided switch-case structure when 'a=7' and 'b=5'?
What will the output be for the provided switch-case structure when 'a=7' and 'b=5'?
Which of the following correctly describes the types of operators mentioned?
Which of the following correctly describes the types of operators mentioned?
What does 'INT' refer to in terms of value storage and size?
What does 'INT' refer to in terms of value storage and size?
Which statement correctly completes the sentence about variable names?
Which statement correctly completes the sentence about variable names?
What will be the value of 'str1' after executing the C program using string concatenation and reversal?
What will be the value of 'str1' after executing the C program using string concatenation and reversal?
What does a while statement expect since the condition is not fully shown?
What does a while statement expect since the condition is not fully shown?
Study Notes
C Programming Multiple Choice Questions
- The developer of the C programming language is Dennis Ritchie.
- C was developed in 1972.
- C is a middle-level programming language.
- C is available for all operating systems including DOS, Unix, and Windows.
- The # symbol is used for pre-processor statements in C.
- Float is a scalar data type in C.
- Tokens in C include keywords, variables, and constants.
- The valid range of the int data type is -32768 to +32767.
- The ; symbol is used to terminate a statement in C.
- The \n escape sequence character is a line terminator in C.
- The \a escape sequence character is used to beep from the speaker in C.
- Character constants are enclosed between single quotes.
- String constants are enclosed between double quotes.
- ‘abc’ is an invalid character constant in C, as it contains multiple characters.
- The maximum length of a variable in C is 32 characters.
- The maximum size of a float variable is 4 bytes.
- The maximum size of a double variable is 8 bytes.
- A declaration of float a; double b; occupies 12 bytes of memory (4 bytes for float & 8 bytes for double).
- The size of a string variable is not specific and depends on the length of the string.
- a+=10 is an example of a compounded assignment statement in C.
- The && operator is used for logical comparison in C.
- The & operator is used for bitwise AND in C.
- The equality operator is represented by == in C.
- Operator precedence determines the order in which operators are evaluated first in C.
- The bitwise AND operator is used for masking in C.
- The % operator is used for modulo (remainder) in C.
- The associability of the = operator is right to left in C.
- The () operator has the highest priority in C.
- The || operator has the lowest priority in C.
- Integer division in C truncates the fractional part.
- ?: is a Ternary Operator.
- (data type) is a type casting operator.
- Explicit type conversion is also known as casting.
- a+=4 is equivalent to a=a+4.
- p++ executes faster than p=p+1 because it is a single instruction.
- C Library functions provide input/output (I/O) facilities.
- Header files in C contain library functions.
- getchar() and putchar() are used for single character I/O.
- printf() returns a negative value when an error occurs.
- putchar(“x”) is an invalid statement in C because it attempts to pass a string to the putchar() function, which is designed for single characters.
- An ampersand (&) in scanf() before a variable name denotes the address of the variable.
- Symbolic constants can be defined using #define.
- The null character is represented by \0.
- The string.h header file is essential for using the strcmp() function.
- malloc() is available in the stdlib.h header file.
- ctype.h contains testing and conversion character functions.
- C supports three looping statements: for, while, and do-while.
- A statement differs from an expression by terminating with a semicolon (;).
- goto is an unconditional control structure.
- auto is a keyword used for storage class.
- a represents a character in C language.
- There are 7 arithmetic operators: + - * / % ++ --.
- There are 32 keywords available in C.
- The advantage of a UNION over a STRUCTURE is memory storage.
- The maximum number of elements in the array declaration int arr; is not specified and depends on the compiler.
- Array subscripts in C always start at 0.
- *int ptr; is the correct way to declare a pointer.
- 17.23 is the output of printf(“2.3f\n”,17.23478).
- The values will be 5, -6 for floor(5.8) and floor(-5.8), respectively.
- 107 is the value of X.
- The output of the program is 91.
- The output of the program is 12.
- A Binary operator applies to two operands while an Unary operator applies to a single operand.
- A variable is a place where we can store data, and the size of an INT is 16 bits.
- Variables can consist of letters, numbers, and underscores. You cannot use keywords.
- The output of the program is: "India is my Country".
- The output of the program is: "India is my Country!!".
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on the fundamentals of C programming with this multiple-choice quiz. Covering topics from data types to syntax rules, this quiz is perfect for beginners and those looking to refresh their understanding of C. Challenge yourself and see how well you know this essential programming language!