Basic C Knowledge Exercise

Quiz
•
Computers
•
University
•
Easy
Akym Morgen
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 2 pts
Insert the missing parts of the code:
int ??? ( ) {
??? ("Hello World");
return 0;
}
PS. Put commas if answers are two or more (e.g. alpha, beta)
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Insert missing special characters in writing comments in C:
??? This is a single-line comment
??? This is a multi-line comment ???
// Single-line
// Multi-line //
// Single-line
** Multi-line **
// Single-line
/* Multi-line */
/* Single-line
/* Multi-line */
3.
FILL IN THE BLANK QUESTION
1 min • 2 pts
Create a variable named myNum and assign the value 47 to it.
?? ??? = ??;
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which is the correct specifier to output the value of myNum?
int myNum = 15; printf("???", myNum);
%c
d%
%ld
%d
5.
FILL IN THE BLANK QUESTION
1 min • 2 pts
Display the sum of 17 + 33, using two variables: a and b.
??? ?? = ???;
int b = 33;
printf("%d", a + b);
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which code parts is needed to create three variables of the same type?
??? myNum1 = 10 ? myNum2 = 15 ? myNum3 = 25;
printf("%d", myNum1 + myNum2 + myNum3);
int and comma (,)
int and semi-colon (;)
int and colon (;)
int and ampersand (&)
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Add the correct data type for the following variables:
??? myNum = 6;
??? myFloatNum = 3.1419;
??? myLetter = 'D';
PS. Put commas for multiple answers (e.g. alpha, beta)
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
cp06-01-1D-Array

Quiz
•
University
9 questions
IPC144 SLG -- Week2

Quiz
•
University
15 questions
ARRAYS AND FUNCTIONS

Quiz
•
University
10 questions
Structure in C

Quiz
•
University
8 questions
Unit 3 C Pro P1

Quiz
•
University
12 questions
CSSE Quiz Day2

Quiz
•
University
10 questions
Basics of C

Quiz
•
University
15 questions
C++ data types

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University