C Programming
C language from basics to advanced placement prep
Showing 301–303 of 303 questions
Which header file is required to use the printf() function?
Correct Answer:
B. #include
EXPLANATION
stdio.h (Standard Input Output header) is required for printf() and scanf() functions.
What is the size of int data type in a 32-bit system?
Correct Answer:
B. 4 bytes
EXPLANATION
In a 32-bit system, int is typically 4 bytes (32 bits). The size may vary depending on the compiler.
Which of the following is the correct syntax to declare a variable in C?
Correct Answer:
A. int x;
EXPLANATION
In C, variable declaration requires a semicolon at the end. The syntax is 'data_type variable_name;'