1. Question: What will be output if you will compile and execute the following c code?
    #include<stdio.h>
    int main(){
      int x=5,y=10,z=15;
      printf("%d %d %d"); 
      return 0;
    }

    A
    Garbage Garbage Garbage

    B
    5 10 15

    C
    15 10 5

    D
    Compiler error

    E
    15 10 4

    Note: Not available
    1. Report
  2. Question: What will be output if you will compile and execute the following c code?


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

    A
    5 10

    B
    6 11

    C
    5 11

    D
    6 10

    E
    Compiler error

    Note: Not available
    1. Report
  3. Question: What will be output if you will compile and execute the following c code?


    #include<stdio.h>
    int main(){
      enum color{
        RED,GREEN=-20,BLUE,YELLOW
      };
      enum color x;
      x=YELLOW;
      printf("%d",x);
      return 0;
    }

    A
    -22

    B
    -18

    C
    1

    D
    Compiler error

    E
    0

    Note: Not available
    1. Report
  4. Question: What will be output if you will compile and execute the following c code?


    #include<stdio.h>
    int main(){
      asm{
        mov bx,8;
        mov cx,10
        add bx,cx;
      }
      printf("%d",_BX);
      return 0;
    }

    A
    18

    B
    8

    C
    0

    D
    Compiler error

    E
    None

    Note: Not available
    1. Report
  5. Question: What will be output if you will compile and execute the following c code?


    #include<stdio.h>
    int main(){
      enum xxx{
         a,b,c=32767,d,e
      };
      printf("%d",b);
      return 0;
    }

    A
    0

    B
    1

    C
    32766

    D
    Compiler error

    E
    None

    Note: Not available
    1. Report
  6. Question: What will be output if you will compile and execute the following c code?


    #include<stdio.h>
    int main(){
      const int i=5;
      i++;
      printf("%d",i);
      return 0;
    }

    A
    5

    B
    6

    C
    0

    D
    Compiler error

    E
    None

    Note: Not available
    1. Report
  7. Question: What will be output if you will compile and execute the following c code?

    #define PRINT printf("c");printf("c++");
    int main(){
      float a=5.5;
      if(a==5.5)
        PRINT
      else
        printf("Not equal");
      return 0;
    }

    A
    c c++ Not equal

    B
    Not equal

    C
    c c++

    D
    Compiler error

    E
    None

    Note: Not available
    1. Report
  8. Question: What are the different types of real data type in C ?

    A
    float, double

    B
    short int, double, long int

    C
    float, double, long double

    D
    double, long int, float

    Note: Not available
    1. Report
  9. Question: What will you do to treat the constant 3.14 as a long double?

    A
    use 3.14LD

    B
    use 3.14L

    C
    use 3.14DL

    D
    use 3.14LF

    Note: Not available
    1. Report
  10. Question: If the binary eauivalent of 5.375 in normalised form is 0100 0000 1010 1100 0000 0000 0000 0000, what will be the output of the program (on intel machine)? #include<stdio.h> #include<math.h> int main() { float a=5.375; char *p; int i; p = (char*)&a; for(i=0; i<=3; i++) printf("%02x\n", (unsigned char)p[i]); return 0; }

    A
    40 AC 00 00

    B
    04 CA 00 00

    C
    00 00 AC 40

    D
    00 00 CA 04

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd