• 1. 
    During preprocessing, the code “#include” gets replaced by the contents of the file stdio.h.

  • yes
  • During linking the code “#include” replaces by stdio.h
  • During execution the code “#include” replaces by stdio.h
  • During editing the code “#include” replaces by stdio.h
  • 2. 
    Which punctuation ends most of the lines of C code?

  • .
  • ;
  • ,
  • " "
  • 3. 
    For the following declaration of a function in C, pick the best statementint [] fun(void (*fptr)(int *));

  • It will result in compile error.
  • No compile error. fun is a function which takes a function pointer fptr as argument and return an array of int.
  • No compile error. fun is a function which takes a function pointer fptr as argument and returns an array of int. Also, fptr is a function pointer which takes int pointer as argument and returns void.
  • No compile error. fun is a function which takes a function pointer fptr as argument and returns an array of int. The array of int depends on the body of fun i.e. what size array is returned. Also, fptr is a function pointer which takes int pointer as argument and returns void
  • 4. 
    The ascii range is .....

  • -32768 to 32767
  • -128 to 128
  • 0-327
  • -128 to 127
  • 5. 
    #includeint main (){ int x; for(x=-1; x<=20; x++)int i; { if(x < 10) continue; else break; printf("India");}

  • unlimited times
  • 21 times
  • 0 times
  • 20 times
  • 6. 
    If, the given below code finds the length of the string then what will be the length?#includeint xstrlen(char *s){ int length = 0; while(*s!='\0') {length++; s++;} return (length);} int main(){ char d[] = "IndiaMAX"; printf("Length = %d\n", xstrlen(d)); return 0;}

  • A - Code returns error
  • B - Code returns the length 8
  • C - Code returns the length 6
  • D - Code returns the length 2
  • 7. 
    Which of these is not a correct variable data type?

  • int
  • float
  • real
  • char
  • 8. 
    The correct order of evaluation for the expression “z = x + y * z / 4 % 2 – 1”

  • * / % = + -
  • /* % - + =
  • - + = * % /
  • * / % + - =
  • 9. 
    What is the 16-bit compiler allowable range for integer constants?

  • -3.4e38 to 3.4e38
  • -32767 to 32768
  • -32668 to 32667
  • -32768 to 32767
  • 10. 
    ______ is used to convert c programs into machine language .

  • An Editor
  • A compiler
  • An interpreter
  • None of these
  • 11. 
    Which is the only function all C programs must contain?

  • start()
  • system()
  • printf()
  • main()
  • 12. 
    Predict the output of below program:#include int main(){ int arr[5]; // Assume that base address of arr is 2000 and size of integer // is 32 bit arr++; printf("%u", arr); return 0;}

  • 2002
  • 2004
  • 2020
  • value required
  • 13. 
    C programs are converted into machine language with the help of

  • An Editor
  • A compiler
  • An operating system
  • None of the above
  • 14. 
    What will be output of ....int a=32765;printf("%d",a+5);

  • 32770
  • -32768
  • -32766
  • 32766
  • 15. 
    Int main () {int x = 24, y = 39, z = 45;z = x + y;y = z - y;x = z - y;printf ("%d %d %d", x, y, z); }

  • 24 39 63
  • 39 24 63
  • 24 39 45
  • 39 24 45
  • 16. 
    Int main(){int a = 10, b = 25;a = b++ + a++;b = ++b + ++a;printf("%d %d n", a, b);}

  • 36 64
  • 35 62
  • 36 63
  • 30 28
  • 17. 
    What is the output of the following program?#includemain(){ char s[] = "Fine"; *s = 'N'; printf("%s", s);}

  • A - Fine
  • B - Nine
  • C - Compile error
  • D - Runtime error
  • 18. 
    Choose the correct program that round off x value (a float value) to an int value to return the output value 4,

  • A - float x = 3.6; int y = (int)(x + 0.5); printf ("Result = %d\n", y );
  • B - float x = 3.6; int y = int(x + 0.5); printf ("Result = %d\n", y );
  • C - float x = 3.6; int y = (int)x + 0.5 printf ("Result = %d\n", y );
  • D - float x = 3.6; int y = (int)((int)x + 0.5) printf ("Result = %d\n", y );
  • 19. 
    Every c program begins execution with____

  • Fun()
  • main()
  • printf()
  • getch()
  • 20. 
    Who is Father of C Language

  • Bjarne Stroustrup
  • James A. Gosling
  • Dennis Ritchie
  • Dr. E.F. Codd
  • 21. 
    Every C statement ends with ------------?

  • .
  • ;
  • ,
  • }
Report Question
warning
access_time
  Time