NEW
Font size
WorksheetsPT-5 Midterm
Total questions: 50
Worksheet time: 25mins
Who is the creator of the C programming language?
In which year was the C programming language developed?
The preprocessor directive that includes the standard input/output library.
import <stdio.h>
main()
#include <stdio.h>
The function used for printing output to the console.
print()
display()
output()
printf()
A _______ is a named storage location for data.
it is a variable naming convention where each word is in lower case, and separated by underscores. It is also known as pothole_case
It is a variable naming convention that the first letter of the first word is lowercase, and the first letter of each subsequent word is capitalized. There are no underscores.
This is a variation of camel case where the first letter of every word, including the first, is capitalized.
Snake Case
Camel Case
Kebab Case
These data type are used to store whole numbers. They can be signed (positive, negative, and zero) or unsigned (positive and zero only).
These data type are used to store numbers with decimal points. They are also known as real numbers.
Whole numbers
string
Integer
These data type are used to store a single character, such as a letter, number, or symbol.
An _____ in C is a collection of elements of the same data type stored in contiguous memory locations.
In C, a string is a one-dimensional array of characters terminated by the null character. What is the character '\0' called?
It informs the compiler about the type of data to expect or display, ensuring variables are interpreted and shown correctly. These specifiers start
with a percent sign (%) followed by a character (or characters) that indicates the data type.
What data type does %d represent?
What data type does %f represent?
integer
string
float
boolean
What data type does %c represent?
What data type does %s represent?
In C it is one of the commonly used function to take input from the user.
printf()
scanf()
input()
What does the symbol > represent?
What does the symbol < represent?
What does the symbol != represent?
What does the symbol >= represent?
What does the symbol <= represent?
Greater than or Equal to
Less than
Greater than
Less than or Equal to
What does the symbol == represent?
Equal to
Equal
What is the output of the following C code snippet?
(Click the image to view it clearly)
What does "\n" represent for?
What is the output of the following C code snippet?
(Click the image to view it clearly)
Error
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
4 16 24 40
Sum = 88
4 8 12 16 20 24 28 32 36 40
Sum = 220
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet, if the user enter 4 rows and 3 columns?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
120000
120000000
200
What is the output of the following C code snippet?
(Click the image to view it clearly)
What is the output of the following C code snippet, if the user input 20?
(Click the image to view it clearly)
What is the output of the following C code snippet, if user input 10?
(Click the image to view it clearly)
What is the output of the following C code snippet?
(Click the image to view it clearly)
1 2 3 4 6 7 8 9 11 12 13 14
Sum: 90
5 10 15
Sum: 30
30
90
What is the output of the following C code snippet?
(Click the image to view it clearly)
Hello, World!
Hello, World!
Hello, World!,
Hello, World!
Hello, World!
Hello, World!
Hello, World!
Hello, World!,
Hello, World!,
Hello, World!,
What is the output of the following C code snippet?
(Click the image to view it clearly)
The _____ statement ends the loop immediately when it is encountered.
The _______ statement skips the current iteration of the loop and continues with the next iteration.
What are the three types of loops used in C programming?
What is the purpose of % operator or Modulo division?
In C if the body of an if...else statement has only one statement, do you need brackets?
No
Yes,
