Elen116 C Programming Quiz

5 Questions | Attempts: 241
Share

SettingsSettingsSettings
Elen116 C Programming Quiz - Quiz

Basic C programming quiz.


Questions and Answers
  • 1. 
    Which pointer declaration is correct?
    • A. 

      Int *pointer;

    • B. 

      Int #pointer;

    • C. 

      Int &pointer;

  • 2. 
    What will this print out?int i = 7;i = (8 <= 7);printf("%i", i);
    • A. 

      7

    • B. 

      1

    • C. 

      0

    • D. 

      8

  • 3. 
    What is wrong with this switch statement?    switch (inputstring)    {           case 'A':                printf("A");                           case 'B':                printf("B");                           case 'C':                printf("C");                           default:                   printf("BLAH!");    }
    • A. 

      Too few cases

    • B. 

      Missing "break" statements

    • C. 

      Missing curly braces

  • 4. 
    (7 != 3)
    • A. 

      True

    • B. 

      False

  • 5. 
    What will be printed? int a = 15; int b = 0; b = (a % 7);  printf("\n\n%i\n", b);
    • A. 

      0

    • B. 

      1

    • C. 

      7

    • D. 

      15

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.