Home » C Programming » Data Types » Question
  1. What will be the output of the following C code? (Initial values: p= 10, q = 12)
    #include <stdio.h>
    void main()
    {
    float p;
    int q;
    printf("Enter two numbers: ", p);
    scanf("%f %f", &p, &q);
    printf("%f, %d", p, q);
    }
    1. 10.000000, 12
    2. 12, 10.000000
    3. 12, Garbage value
    4. Garbage value, 10.000000
    5. 10.000000, Garbage value
Correct Option: E

10.000000, Garbage value



Your comments will be displayed only after manual approval.