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 i=3;

switch(i)

{

default:printf("zero");

case 1: printf("one");

break;

case 2:printf("two");

break;

case 3: printf("three");

break;

}

}



2) Which of the following statements should be used to obtain a remainder after dividing 3.5 by 2.5 ?


3)

What will be the output of the program?

#include<stdio.h>

int main()

{

    int i=4;

    switch(i)

    {

        default:

           printf("This is default\n");

        case 1:

           printf("This is case 1\n");

          

        case 2:

           printf("This is case 2\n");

           break;

        case 3:

           printf("This is case 3\n");

    }

    return 0;

}



4) #include int main() { int a = 1000; switch(a) { } printf("This is c program."); return 0; }


5) What will be the output of the program? #include int main() { int i=0; for(; i<=5; i++); printf("%d,", i); return 0; }


6)

Point out the error in the following program.

#include<stdio.h>

int main()

{

    display();

    return 0;

}

void display()

{

    printf("Disp fun");

}



7) Point out the error, if any in the while loop. #include int main() { void fun(); int i = 1; while(i <= 5) { printf("%d\n", i); if(i>2) goto here; } return 0; } void fun() { here: printf("It works"); }


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


9)

void main(){

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

if(a,b,x,y)

printf("hello");

}



10) What is the output of the program #include 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; }
Page 1 of 2
Home | Register for Job Updates | Contact Us