C Programming Language

Pointers MCQ

Random: Off 1. What is a pointer in C programming? ⓐ. A variable that stores the address of another variable ⓑ. A variable that stores a fixed value ⓒ. A variable that stores a string ⓓ. A variable that stores only integers Explanation: A pointer in C is a variable that stores the memory address […]

Pointers MCQ Read More »

Strings MCQ

Random: Off 1. Which of the following correctly represents a string termination in C? ⓐ. \t ⓑ. \0 ⓒ. \n ⓓ. \r Explanation: In C, strings are terminated by the null character ‘\0’, which signifies the end of the string. 2. What is the output of the following code snippet?

Strings MCQ Read More »

Arrays MCQ

Random: Off 1. What is an array in C? ⓐ. A single variable that holds multiple values of different types ⓑ. A data structure that can hold multiple values of the same type ⓒ. A function that can return multiple values ⓓ. A collection of strings Explanation: An array in C is a data structure

Arrays MCQ Read More »

Input and Output functions MCQ

Random: Off 1. Which function is used to read a character from the standard input in C? ⓐ. getchar() ⓑ. putchar() ⓒ. scanf() ⓓ. gets() Explanation: The `getchar()` function is used to read a single character from the standard input (keyboard). 2. Which function is used to print a character to the standard output in

Input and Output functions MCQ Read More »

Data Types and Variables MCQ

Random: Off 1. What keyword is used to define a variable in C? ⓐ. var ⓑ. define ⓒ. int ⓓ. declare Explanation: In C programming, the keyword “int” is used to declare integer variables. For example, “int x;” declares a variable named ‘x’ of type integer. 2. What is the size of the ‘char’ data

Data Types and Variables MCQ Read More »

Scroll to Top