Sreejobs Logo
   For Latest Job Updates  
sreenutech.com Online Exams
Home Govt Jobs IT Fresher Jobs IT Exp Jobs IT Walk-Ins MBA Jobs BPO Jobs Register FAQ’s Post Job Contact Us
Search:
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 20.
1)

void main(){

int a= 0;int b = 20;char x =1;char y =10;

if(a,b,x,y)

printf("hello");

}



2)

What will be the output of the program?

#include<stdio.h>

int main()

{

    int i=2;

    printf("%d, %d\n", ++i, ++i);

    return 0;

}



3) Size of short integer and long integer can be verified using the sizeof() operator


4)

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



5)

Point out the error, if any in the program.

#include<stdio.h>

int main()

{

    int i = 10;

    switch(i)

    {

        case 1:

           printf("Case10");

           break;

        case 1*2+4:

           printf("Case2");

           break;

    }

return 0;

}



6)

void  main()

{

float me = 1.1;

double you = 1.1;

if(me==you)

printf("I love U");

else

printf("I hate U");

}



7)

Will the following code compile

void main()

{

int k=1;

printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");

}



8)

What is the output of the program

#include<stdio.h>

int main()

{

    struct emp

    {

        char name[20];

        int age;

        float sal;

    };

    struct emp e = {"Tiger"};

    printf("%d, %f\n", e.age, e.sal);

    return 0;

}



9) A float is 4 bytes wide, whereas a double is 8 bytes wide. long double is 10 byte wide


10)

What will be the output of the program?

#include<stdio.h>

int main()

{

    int x, y, z;

    x=y=z=1;

    z = ++x || ++y && ++z;

    printf("x=%d, y=%d, z=%d\n", x, y, z);

    return 0;

}