Q.1.

How many times the while loop will get executed if a short int is 2 byte wide?

#include<stdio.h>
int main()
{
    int j=
    while(j <=
    {
        printf("%c %d\n", j, j);
        j++;
    }
    return
}
Q.2.

Which of the following sentences are correct about a for loop in a C program?

1: for loop works faster than a while loop.
2: All things that can be done using a for loop can also be done using a while loop.
3: for(;;); implements an infinite loop.
4: for loop can be used if we want statements in a loop get executed at least once.
Q.3.

What will be the output of the program?

#include<stdio.h>
int main()
{
    char str[]="C-program";
    int a =    printf(a >10?"Ps\n":"%s\n", str);
    return}
Q.4.

Which of the following is not logical operator?

Q.5.

Which of the following statements are correct about the below program?

#include<stdio.h>
int main()
{
    int n =y =    y == 1 ? n=0 : n=    if(n)
        printf("Yes\n");
    else
        printf("No\n");
    return}
Q.6.

What will be the output of the program?

#include<stdio.h>
int main()
{
    int a =b =c;
    if(!a >=        b =    c =    printf("b = %d c = %d\n", b, c);
    return}
Q.7.

In mathematics and computer programming, which is the correct order of mathematical operators ?

Q.8.

Which of the following sentences are correct about a switch loop in a C program?

1: switch is useful when we wish to check the value of variable against a particular set of values.
2: switch is useful when we wish to check whether a value falls in different ranges.
3: Compiler implements a jump table for cases used in switch.
4: It is not necessary to use a break in every switch statement.
Q.9.

What will be the output of the program?

#include<stdio.h>
int main()
{
    unsigned int i =/* Assume 2 byte integer*/
    while(i++ !=        printf("%d",++i);
    printf("\n");
    return}
Q.10.

Which of the following cannot be checked in a switch-case statement?

Q.11.

What will be the output of the program?

#include<stdio.h>
int main()
{
    int x =    float y = 3.    if(x == y)
        printf("x and y are equal");
    else
        printf("x and y are not equal");
    return}