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. Which of the data types has the size that is variable?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Since the size of the structure depends on its fields, it has a variable size.



  1. What will be the output of the following C code?
     #include <stdio.h>
    int main()
    {
    float f = 'I';
    printf("%f", f);
    return 0;
    }











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Since the ASCII value of I is 73, the same is assigned to the float variable and printed.


  1. What is the size of an int data type?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The size of the data types depend on the system.



  1. Which of the following is a User-defined data type?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    typedef and struct are used to define user-defined data types.