C Programming
C language from basics to advanced placement prep
303 Questions 10 Topics Take Test
Advertisement
Showing 301–303 of 303 questions
Q.301 Easy Basics & Syntax
Which header file is required to use the printf() function?
A #include
B #include
C #include
D #include
Correct Answer:  B. #include
EXPLANATION

stdio.h (Standard Input Output header) is required for printf() and scanf() functions.

Take Test
Q.302 Easy Basics & Syntax
What is the size of int data type in a 32-bit system?
A 2 bytes
B 4 bytes
C 8 bytes
D 1 byte
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.

Take Test
Q.303 Easy Basics & Syntax
Which of the following is the correct syntax to declare a variable in C?
A int x;
B int x
C int: x;
D declare int x;
Correct Answer:  A. int x;
EXPLANATION

In C, variable declaration requires a semicolon at the end. The syntax is 'data_type variable_name;'

Take Test
IGET
iget AI
Online · Ask anything about exams
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips