Font size
WorksheetsC basics
Total questions: 25
Worksheet time: 8mins
Who is know as founder of C language
Dennis Ritchie
Bjarne Stroustroup
Tim Berner Lee
Rasmus Ledorf
Which of these is not a correct variable data type?
int
float
real
char
C is a
Low level language
Assembly language
Medium level language
High level language
Which punctuation ends most of the lines of C code?
.
;
,
" "
The starting point of C execution at
==
main()
function()
!=
What do you think is the best ways to enhance your skill in programming
Study Hard
Practice and learn new
Eating Fufu while coding
Study one day and leave it
Find if the condition is True or False where int x=10; y=12;
x == y
1 (True)
0 (False)
What do you think is the output for the below code snippet?
int main(){
int a=10,b=20;
printf("%d", b/a);
}
Error
0.2
2
30
What do you need to import stdio.h a header file?
Just a waste of time
To run the code
It helps in compilation to binary coded file
To perform input and output operations
What will be the output of following program?
Hello
OK
Hello
OK
Error
What is the output of the C statement.?
int main()
{
int a=0;
a = 4 + 4/2*5 + 20;
printf("%d", a);
return 0;
}
(a) statements executes a group of statements repeatedly as long as a condition is met .
What is a correct syntax to output "Hello World" in C?
printf("Hello World");
System.out.printline("Hello World");
cout << "Hello World";
Console.WriteLine("Hello World");
How do you insert COMMENTS in C code?
// This is a comment
--This is a comment#
This is a comment/
* This is a comment
How can you create a variable with the numeric value 5?
num = 5;
val num = 5;
num = 5 int;
int num = 5;
How can you create a variable with the floating number 2.8?
float num = 2.8;
num = 2.8 float;
num = 2.8 double;
val num = 2.8;
Which format specifier is often used to print integers?
%d
%c
%s
%f
Which operator can be used to compare two values?
==
><
=
<>
What do we call the following? int myNumbers[] = {25, 50, 75, 100};
None of the above
An array
A class
A pointer
