1. 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
  2. Question: What will be output if you will compile and execute the following c code?
    #include<stdio.h>
    int main(){
     signed int a=-1;
     unsigned int b=-1;
     if(a==b)
       printf("%d %d",a,b);
     else
       printf("Not equal");
     return 0;
    }

    A
    -1 -1

    B
    -1 32767

    C
    -1 -32768

    D
    Not equal

    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(){
      float f=5.5f;
      float x;
      x=f%2;
      printf("%f",x);
      return 0;
    }

    A
    1.500000

    B
    1.000000

    C
    5.500000

    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>
    int main(){
      int a=-20;
      int b=-3;
      printf("%d",a%b);
      return 0;
    }

    A
    2

    B
    -2

    C
    18

    D
    -18

    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(){
      char c='0';
      printf("%d %d",sizeof(c),sizeof('0'));
      return 0;
    }

    A
    1 1

    B
    2 2

    C
    1 2

    D
    2 1

    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(){
      char *url="c:\tc\bin\rw.c";
      printf("%s",url);
      return 0;
    }

    A
    c:\tc\bin\rw.c

    B
    c:/tc/bin/rw.c

    C
    c: c inw.c

    D
    c:cinw.c

    E
    w.c in

    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(){
      goto abc;
      printf("main");
      return 0;
    }

    void dispaly(){
      abc:
        printf("display");
    }

    A
    main

    B
    display

    C
    maindisplay

    D
    displaymain

    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(){
      int i=3;
      if(3==i)
        printf("%d",i<<2<<1);
      else
        printf("Not equal");
    }

    A
    1

    B
    48

    C
    24

    D
    Not equal

    E
    Compiler 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(){
      int x=2,y=3;
      if(x+y<=5)
        printf("True");
      else
        printf("False");
    }

    A
    True

    B
    False

    C
    Compiler error: Lvalued required

    D
    Compiler error: Invalid expression

    E
    None

    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(){
      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
Copyright © 2024. Powered by Intellect Software Ltd