WorksheetsBasics of C
Total questions: 30
Worksheet time: 15mins
What is an algorithm?
Which symbol is commonly used to represent a decision in a flowchart?
Which of the following is a characteristic of structured programming?
What is a pseudo code?
In a flowchart, the start/end is shown using:
Structured programming promotes:
Jumping with goto
Breaking problems into modules
Writing unstructured code
All of the above
Which of the following is NOT a valid algorithm feature?
Which of the following is a valid variable in C?
What is the size of int in most systems (32-bit)?
Which keyword is used to declare a constant in C?
constant
The %d format specifier is used for:
Character input
Float input
Integer input
String input
Which operator is used for division in C?
Which of the following is NOT a valid C data type?
What is the output of: printf("%d", 5 + 3 * 2);
What is the correct way to take integer input in C?
scanf("%f", &a);
Which statement is used to make a decision in C?
Which loop is executed at least once even if the condition is false?
What is the output of this code?
int x = 5;
if (x == 5)
printf("Yes");
else
printf("No");
Error
5
Which control statement is used to exit from a loop?
The switch statement can be used with in C:
int
char
both (int, char)
string
The syntax of a `for` loop is in C:
Which loop is best when the number of iterations is known?
A function in C must be
define
declare
called
all of these
What is recursion?
Which keyword is used to define a function?
define
void/int/char
What is the default return type of a C function if not specified?
Call by value means:
Passing address of variable
Passing copy of value
Passing pointers
Using global variables
Call by reference can be done using:
Arrays
functions
Pointers
Loops
Which function is used to return a value in C?
Scope rules define:
Data types of variables
Where a variable is accessible
Return type of functions
Size of the program
