Data Types


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    float num = 0.3;
    if (num == 0.3)
    printf("Interview Mania");
    else
    printf("Advanced C Classes");
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Advanced C Classes


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    double n = 23458965.12124;
    int m = n;
    printf("%d", m);
    printf(" %lf", m);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    23458965, 0.000000



  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. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    10.000000, Garbage value


  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    float num = 0.2;
    printf("%d, ", num);
    printf("%f", num);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Garbage value, 0.200000



  1. What will be the output of the following C code?
    #include <stdio.h>
    void main()
    {
    int n = 98;
    char m = n;
    printf("%c\n", m);
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    b