
C Programming
Quiz by ibrahim shabbir (SGA)
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
In the problem-solving process, the step during which a solution is divided into sub solutions and arranged in proper order to solve the problem is
Consider the given algorithm
Step 1: Start
Step 2: INPUT A
Step 3: IF A> 0 THEN GOTO Step 4 ELSE GOTO Step 7
Step 4: A = A -1
Step 5: PRINT A
Step 6: GOTO Step 3
Step 7: Stop
If the input is 5, then the output of this algorithm is
Consider the given algorithm
Step 1: Start
Step 2: A = 5, B = 10, C =15
Step 3: X = A + B + C
Step 4: Y = X / 3
Step 5: Output Y
Step 6: Stop
The output of the given algorithm will show the
In the problem-solving process, the step during which the number of possible solutions is determined is
Which of the following are used to indicate the start of multiple line comments in a C program?
If the main function returns the integer value but it does not have any arguments, then it is written as
How many types of typecasting are there in C programming language?
The CORRECT categorization of built-in function based on preprocessor directives is
Examples of unary operators are
I. !
II. ++
III. %
IV. ||
An example of compound assignment operators is
Which of the following C code will CORRECTLY input two values?
Consider the given C statement.
If ((a % 2 == 0) && (a % 3 == 0))
This statement will be TRUE when the value of variable a is
If more than two conditions need to be tested, then the conditional statement(s) that should be used is/are
I. If statement
II. If-Else statement
III. If -Else- If statement
Consider the given program
#include<stdio.h>
int main()
{
int n;
for ( n = 10; n > 1; n--)
{
printf("%d" , n);
}
return 0;
}
The output of this program is
Which of the following loop statements should be used in this program to repeat the code inside the loop body 3 times?
Consider the given program
#include<stdio.h>
int main()
{
int i = 1;
while( ++i <= 10)
{
printf("%d" , i++);
++i ;
}
return 0;
}
The output of the program is
Consider the given program
#include<stdio.h>
int main()
{
float h, w;
printf("Enter Height and WidthValues:\n");
_______________________________________________
long int area = 0.5*h*w;
printf(“The Area of Rhombus is: %d” , area);
return0;
}
The total memory (in bytes) occupied by the variables in this program is
Consider the given program
#include<stdio.h>
int main()
{
float h, w;
printf("Enter Height and WidthValues:\n");
_______________________________________________
long int area = 0.5*h*w;
printf(“The Area of Rhombus is: %d” , area);
return0;
}
The code line that should replace the empty box to input height and width values:
Consider the given program
#include<stdio.h>
int main()
{
float h, w;
printf("Enter Height and WidthValues:\n");
_____________________________________________
long int area = 0.5*h*w;
printf(“The Area of the Rhombus is: %d” , area);
return0;
}
If the value of h = 9 and value of w = 3.1, then the output of this program is
Consider the given program
#include<stdio.h>
int main()
{
int n = 10, i;
for ( i = 1; i <=n; ++i)
{
printf("Vision\n");
}
return 0;
}
After the loop condition becomes false, the value of variable i is