Subject-C Programming Section - A: Tick The Correct Answer From The Option Given
Subject-C Programming Section - A: Tick The Correct Answer From The Option Given
Subject-C Programming Section - A: Tick The Correct Answer From The Option Given
Section - A
Tick the Correct Answer from the option given
1. How many times below for loop will be executed ?
#include<stdio.h>
int main()
{
int i=0;
for(;;)
printf("%d",i);
return 0;
}
A) 0 times
B) Infinite times
C) 1 times
D) 10 times
3. Array can be considered as set of elements stored in consecutive memory locations but having
__________.
A) Different Data Type
B) None of these
C) Same Data Type
D) Same Scope
7.
How many times the while loop will get executed if a short int is 2 byte wide?
#include<stdio.h>
int main()
{
int j=1;
while(j <= 255)
{
printf("%c %d\n", j, j);
j++;
}
return 0;
}
A) Infinite times
B) 255 times
C) 256 times
D) 254 times
9. In mathematics and computer programming, which is the correct order of mathematical operators ?
A) Addition, Subtraction, Multiplication, Division
B) Division, Multiplication, Addition, Subtraction
C) Multiplication, Addition, Division, Subtraction
D) Addition, Division, Modulus, Subtraction
Section – B