Time Remaining :00:00:00

Questions to be answered 20

C Technical Aptitude Test 1



Question No : 1

void main()
{
    int  const * p=5;
    printf("%d",++(*p));
}

What is the output?

Question No : 2

main()
{
    char s[ ]="man";
    int i;
    for(i=0;s[ i ];i++)
    printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);
}

What is the output?

Question No : 3

#define square(a) a*a
main()
{
    int i;
    i= 4/square(2);
    printf(“%d”, i);
}

What is the output?

Question No : 4

int main()
{
    char str1[] = "Hello";
    char str2[] = "Hello";
    if(str1 == str2)
    printf("Equal\n");
    else
    printf("Unequal\n");
    return 0;
} 

What is the output?

Question No : 5

main()
{
    static int var = 5;
    printf("%d ",var--);
    if(var)
        main();
}

What is the output?

Question No : 6

main()
{
    extern int i;
    i=20;
    printf("%d",i);
}

What is the output?

Question No : 7

main()
{
    char *p;
    printf("%d %d ",sizeof(*p),sizeof(p));
}

What is the output?

Question No : 8

main()
{
    int k=1;
    printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE");
}

What is the output?

Question No : 9

main()
{
    int i;
    printf("%d",scanf("%d",&i));  // value 10 is given as input here
}

What is the output?

Question No : 10

#define f(g,g2) g##g2
main()
{
    int var12=100;
    printf("%d",f(var,12));
}

What is the output?

Question No : 11

main()
{
    struct xx
     {
            int x=3;
            char name[]="hello";
     };
     struct xx *s=malloc(sizeof(struct xx));
     printf("%d",s->x);
     printf("%s",s->name);
}

What is the output?

Question No : 12

main()
{
 extern out;
 printf("%d", out);
}
int out=100;

What is the output?

Question No : 13

main()
{
 printf("%d", out);
}
int out=100;

What is the output?

Question No : 14

main()
{
    int i=5;
    printf("%d",i+++++i);
}

What is the output?

Question No : 15

enum colors {BLACK,BLUE,GREEN}
main()
{
    printf("%d..%d..%d",BLACK,BLUE,GREEN);
}

What is the output?

Question No : 16

main()
{
clrscr();
}
clrscr();

Choose the best option

Question No : 17

void main()
{
   char far *farther,*farthest;
   printf("%d..%d",sizeof(farther),sizeof(farthest));
 }

What is the output?

Question No : 18

void main()
{
    int c=- -2;
    printf("c=%d",c);
}

What is the output?

Question No : 19

#define int char
main()
{
    int i=65;
    printf("sizeof(i)=%d",sizeof(i));
}

What is the output?

Question No : 20

main()
{
    int i=-1;
    -i;
    printf("i = %d, -i = %d \n",i,-i);
}

What is the output?


Planning to do an MBA?
A quick all-in-one MBA entry manual for MBA Aspirants. Book covers
  • Possible MBA Tests & Exam Preparation
  • Tips to choose right MBA Program
  • Essay, Resume & Letter of Recommendation
  • MBA Interview Preparation
  • MBA Financial Planning
Price - 6.99$
 

Popular Videos

How to speak to people

How to speak so that people want to listen.

Got a tip or Question?
Let us know