C Programming Practice - Test 6

10 Questions | Total Attempts: 41

SettingsSettingsSettings
C Programming Quizzes & Trivia

. Dear Learner, This Assessment consists of questions to test your understanding on - C Programming You may attempt the same and clarify doubts in WP Group. / With your Faculty Member Regards, Team SHIVAM


Questions and Answers
  • 1. 
    Pick up the right alternative void main() { int const * p=5; printf("%d",++(*p)); }
    • A. 

      No Output

    • B. 

      Garbage Value

    • C. 

      Compiler Error

    • D. 

      Linker Error

  • 2. 
    Pick up the right alternative main() { extern int i; i=20; printf("%d",i); }
    • A. 

      No Output

    • B. 

      Garbage Value

    • C. 

      Compiler Error

    • D. 

      Linker Error

  • 3. 
    Pick up the right alternative main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
    • A. 

      Compiler Error

    • B. 

      Garbage Value

    • C. 

      No Output

    • D. 

      Linker Error

  • 4. 
    Pick up the right alternative main() { clrscr(); } clrscr();
    • A. 

      Compiler Error

    • B. 

      Garbage Value

    • C. 

      No Output

    • D. 

      Linker Error

  • 5. 
    Pick up the right alternative main() { int x=5,y; x=y; printf(“%d %d”, x, y); }
    • A. 

      Compiler Error

    • B. 

      Garbage Value

    • C. 

      No Output

    • D. 

      Linker Error

  • 6. 
    Pick up the right alternative #include void main() { int x=5,*y; x=y; printf("%d %d",*x,*y); }
    • A. 

      Compiler Error

    • B. 

      Garbage Value

    • C. 

      No Output

    • D. 

      Linker Error

  • 7. 
    Pick up the right alternative void main() { float *x=0.5; int *y; y=x; printf("%d",*y); }
    • A. 

      Compiler Error

    • B. 

      Garbage Value

    • C. 

      No Output

    • D. 

      Linker Error

  • 8. 
    Pick up the right alternative #include void main() { char *str="abcdef"; int n=str; printf("%d",n); }
    • A. 

      Compiler error

    • B. 

      Garbage value

    • C. 

      Warning

    • D. 

      Linker error

  • 9. 
    Pick up the right alternative void main() { int n; n=scanf("%d",&n)+printf("%d",n); print("%d",n); }
    • A. 

      Compiler Error

    • B. 

      Garbage value

    • C. 

      Warning

    • D. 

      Linker error

  • 10. 
    Pick up the right alternative void main() { int *x=10,*y='a'; char *p=97; if(*p==*y) printf("%d",*x); }
    • A. 

      Compiler Error

    • B. 

      Garbage value

    • C. 

      No Output

    • D. 

      Linker error

Back to Top Back to top