NEW
Font size
WorksheetsC programming
Total questions: 13
Worksheet time: 7mins
Who is the father of C language?
Steve Jobs
James Gosling
Dennis Ritchie
Rasmus Lerdorf
All keywords in C are in ____________?
LowerCase letters
UpperCase letters
CamelCase letters
None of the mentioned
What is #include <stdio.h>?
Preprocessor directive
Inclusion directive
File inclusion directive
None of the mentioned
Which character is used to indicate the end of a statement in C?
:
.
;
,
Which symbol is used for the 'modulo' operation in C?
%
*
/
^
What data type would you use to store a character in C?
char
int
float
double
What is the purpose of the printf function in C?
To read input
To print output
To perform calculations
To control program flow
What does %d signify in the printf or scanf function?
Decimal integer
Double data type
Dynamic allocation
Directory path
What does the '==' operator check?
Assignment
Equality
Greater than
Less than
What does the break statement do in a loop?
Exits the loop
Skips the current iteration
Repeats the loop
Does nothing
What is the default return type of a function in C if no return type is specified?
void
char
float
int
Which of the following is a valid way to declare a pointer in C?
int &ptr;
ptr int;
int ptr*;
int *ptr;
What does the sizeof operator do in C?
Both a and b
Returns the size of a variable
Returns the size of a data type
Returns the total memory used by the program
