
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
8 questions
Punteros y sobrecarga

Quiz
•
Professional Development
13 questions
Python Final Quiz

Quiz
•
Professional Development
16 questions
Flutter Test

Quiz
•
Professional Development
10 questions
. Python бағдарламалау тілі

Quiz
•
Professional Development
10 questions
Avaliação Pensamento Computacional - Prático

Quiz
•
1st Grade - Professio...
10 questions
Lenguaje de programación C 3BGU

Quiz
•
Professional Development
15 questions
Snippets LookOver-round 2

Quiz
•
Professional Development
10 questions
c programming-Test 1

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade