Skills101
← All practice quizzes

Quiz: C Data Types and Operators

5 questionsNo time limitPass: 60%+10 XP on first pass

C's data types and their sizes, format specifiers, scanf input, type casting, integer division, increment operators, and the operator traps that appear in output questions.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What does this print?

    #include <stdio.h>
    int main(void) {
        int a = 10, b = 4;
        printf("%d %d", a / b, a % b);
        return 0;
    }
    
  2. Question 2

    Why does scanf("%d", &n); use &?

  3. Question 3

    What does this print?

    #include <stdio.h>
    int main(void) {
        int x = 3;
        int y = x++ * 2;
        printf("%d %d", x, y);
        return 0;
    }
    
  4. Question 4

    What does printf("%d", 5 > 3); print?

  5. Question 5

    What does this print?

    #include <stdio.h>
    int main(void) {
        printf("%d", 1 << 4);
        return 0;
    }