Scholarship Test For 3 Month Online Project Development Program (sep'10-nov'10)

16 Questions

Settings
Please wait...
Scholarship Test For 3 Month Online Project Development Program (sep

Www. Collegeproject. In has launched scholarships (Rs. 4000) for meritorious students for our 3-Month Online Project development Program (Sep2010-Nov-2010). Pass mark is 60%. The students who have passed in the test will be mailed the coupon code within 24 hours. The students will have to enter the same coupon code at the time of payment and he will get a scholarship discount of Rs4000/ only. Student must enter the same email id which has been used registration with www. Collegeproject. In. Student must enter their mobile no as their unique id no. For any query write to us at [email protected] In or call 9311481855. All the best.


Questions and Answers
  • 1. 
    # include int one_d[]={1,2,3};main(){int *ptr;ptr=one_d;ptr+=3;printf("%d",*ptr);
    • A. 

      1

    • B. 

      2

    • C. 

      3

    • D. 

      Garbage Value

    • E. 

      Compilation error

  • 2. 
    main(){char s[ ]="man";int i;for(i=0;s[ i ];i++)printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);}What will be the second output of printf?
    • A. 

      Nnnn

    • B. 

      Aaaa

    • C. 

      Mmmm

    • D. 

      30

  • 3. 
    Main(){int a[10];printf("%d",*a+1-*a+3);
    • A. 

      3

    • B. 

      Some address will be printed.

    • C. 

      0

    • D. 

      4

  • 4. 
    Main(){float me = 1.1;double you = 1.1;if(me==you)printf("I love U");elseprintf("I hate U");}
    • A. 

      I love U

    • B. 

      I hate U

    • C. 

      I

    • D. 

      U

    • E. 

      None of these.

  • 5. 
    main(){int i=3;switch(i){default:printf("zero");case 1: printf("one");break;case 2:printf("two");break;case 3: printf("three");break;}} 
    • A. 

      One

    • B. 

      Two

    • C. 

      Three

    • D. 

      Compilation error.

  • 6. 
    main(){int i=10;i=!i>14;Printf ("i=%d",i);} 
    • A. 

      1

    • B. 

      2

    • C. 

      0

    • D. 

      None of these

  • 7. 
    Main(){printf("\nab");printf("\bsi");printf("\rha");}
    • A. 

      Nbr

    • B. 

      Hsa

    • C. 

      Aib

    • D. 

      Hai

  • 8. 
    #include #define a 10main(){#define a 50printf("%d",a);} 
    • A. 

      10

    • B. 

      Runtime error

    • C. 

      Compilation error.

    • D. 

      50

    • E. 

      None of these

  • 9. 
    #includemain(){int i=1,j=2;switch(i){case 1: printf("GOOD");break;case j: printf("BAD");break;}}
    • A. 

      GOOD

    • B. 

      BAD

    • C. 

      Compilation error.

    • D. 

      None of these.

  • 10. 
    Main(){int i=0;for(;i++;printf("%d",i)) ;printf("%d",i);}
    • A. 

      0

    • B. 

      1

    • C. 

      2

    • D. 

      None of these.

  • 11. 
    Main(){char not;not=!2;printf("%d",not);}
    • A. 

      1

    • B. 

      2

    • C. 

      0

    • D. 

      Compilation error

  • 12. 
    #define FALSE -1#define TRUE 1#define NULL 0main() {if(NULL)puts("NULL");else if(FALSE)puts("TRUE");elseputs("FALSE");} 
    • A. 

      NULL

    • B. 

      TRUE

    • C. 

      Compilation error

    • D. 

      FALSE

  • 13. 
    Void main(){ int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n");}
    • A. 

      Forget it

    • B. 

      Ok here

    • C. 

      None of these

    • D. 

      Not sure

  • 14. 
    Main(){int *j;{int i=10;j=&i;}printf("%d",*j);} 
    • A. 

      10

    • B. 

      Some address

    • C. 

      Compilation error.

    • D. 

      None of these

  • 15. 
    # include aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2]();
    • A. 

      Bye

    • B. 

      Aaa

    • C. 

      Bbb

    • D. 

      Ccc

  • 16. 
    Register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a);}
    • A. 

      Compilation error

    • B. 

      Runtime error

    • C. 

      Stack overflow

    • D. 

      None of these