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

    A
    2 6

    B
    4 6

    C
    2 5

    D
    4 5

    E
    Compiler error

    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(){
      char *str;
      scanf("%[^\n]",str);
      printf("%s",str);
      return 0;
    }

    A
    It will accept a word as a string from user.

    B
    It will accept a sentence as a string from user.

    C
    It will accept a paragraph as a string from user.

    D
    Compiler error

    E
    None of above

    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(){
      int array[3]={5};
      int i;
      for(i=0;i<=2;i++)
      printf("%d ",array[i]); 
      return 0;
    }

    A
    5 garbage garbage

    B
    5 0 0

    C
    5 null null

    D
    Compiler error

    E
    None

    Note: Not available
    1. Report
  4. Question: What will be output if you will compile and execute the following c code?
    #include<stdio.h>
    
    void call(int,int,int);
    
    int main(){
      int a=10;
      call(a,a++,++a); 
      return 0;
    }
    
    void call(int x,int y,int z){
      printf("%d %d %d",x,y,z);
    }

    A
    10 10 12

    B
    12 11 12

    C
    12 12 12

    D
    10 11 12

    E
    Compiler error

    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(){
      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
  6. Question: What will be output if you will compile and execute the following c code?


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

    A
    17

    B
    18

    C
    21

    D
    22

    E
    Compiler error

    Note: Not available
    1. Report
  7. 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
  8. Question: What will be output if you will compile and execute the following c code?


    #include<stdio.h>
    int main(){
      float f=3.4e39;
      printf("%f",f);
      return 0;
    }

    A
    3.4e39

    B
    3.40000…

    C
    +INF

    D
    Compiler error

    E
    Run time error

    Note: Not available
    1. Report
  9. 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
  10. 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
Copyright © 2024. Powered by Intellect Software Ltd