
c-prog quiz

Quiz
•
Computers
•
Professional Development
•
Medium
Selvauma C
Used 1+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
1. Which of the following is the correct syntax to include a header file in a C program?
#include<file>
#include file
include<file>
#include "file"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main()
{
int x = 10,
y = 20;
printf("%d", x * y);
return 0;
}
10
20
200
Compilation error
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the return 0; statement in the main() function?
It stops the execution of the program.
It returns control to the operating system.
It specifies that the program executed successfully.
It prints 0 on the screen.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to access the value of a variable through a pointer?
*
+
%
()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid keyword in C?
return
goto
class
switch
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
#include<stdio.h>
int main() {
int a = 5, b = 2;
printf("%d", a / b);
return 0;
}
2
3
2.5
0
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write a single-line comment in C?
/* Comment */
// Comment
-- Comment
# Comment
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
C Programming

Quiz
•
Professional Development
10 questions
C Programming

Quiz
•
Professional Development
10 questions
Demo C programming

Quiz
•
Professional Development
10 questions
C Code Master lvl 2 A

Quiz
•
Professional Development
15 questions
C Language Quiz-1

Quiz
•
University - Professi...
10 questions
C Language Basic Quiz

Quiz
•
7th Grade - Professio...
10 questions
c program -basic

Quiz
•
Professional Development
10 questions
Day 2 C Programming quiz

Quiz
•
Professional Development
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade