Post Type ArchivesQuizzes By Newtum

Aptitude Test C Programming For Loops

Welcome to Your Quiz: Aptitude Test C Programming For Loops

Name Email
1.

Which for loop has range of similar indexes of ‘i’ used in for (i = 0;i < n; i++)?

2.

Which of the following cannot be used as LHS of the expression in for (exp1;exp2; exp3)?

3.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
for ( ;  ;  ; )
printf("In for loop\n");
printf("After loop\n");
}

4.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k;
for (k = -3; k < -5; k++)
printf("Hello");
}

5.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int *p = NULL;
for (foo(); p; p = 0)
printf("In for loop\n");
printf("After loop\n");
}

6.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
for (foo(); i == 1; i = 2)
printf("In for loop\n");
printf("After loop\n");
}
int foo()
{
return 1;
}

7.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 0;
for (k < 3; k++)
printf("Hello");
}

8.

The C code ‘for(;;)’ represents an infinite loop. It can be terminated by ___________

9.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
short i;
for (i = 1; i >= 0; i++)
printf("%d\n", i);
}

10.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++)
printf("Hello");
}

11.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int k = 0;
for (k)
printf("Hello");
}

12.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 0;
for (i++; i == 1; i = 2)
printf("In for loop ");
printf("After loop\n");
}

13.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
for (int i = 0;i < 1; i++)
printf("In for loop\n");
}

14.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++);
printf("%lf", k);
}

15.

How many times the below loop will be executed?
#include <stdio.h>
int main()
{
int x, y;
for(x=5; x>=1; x–)
{
for(y=1; y<=x; y++)
printf("%d\n",y);
}
}


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Loops

Please click on View Result Button to see the Result.



Aptitude Test C Programming For If Else Statements

Welcome to Your Quiz: Aptitude Test C Programming For If Else Statements

Name Email
1.

What will be the output of the following C code?
#include <stdio.h>
int x;
void main()
{
if (x)
printf("hi");
else
printf("how are u");
}

2.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
if (printf("%d", printf(")))
printf("We are Happy");
else if (printf("1"))
printf("We are Sad");
}

3.

What will be the output of the following C code?
#include<stdio.h> 
void main()
{
int x = 0;
if (x == 0)
printf("hi");
else
printf("how are u");
printf("hello");
}

4.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x >= 0)
printf("true\n");
else
printf("false\n");
}

5.

What will be the output of the following C code?
#include<stdio.h> 
void main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}

6.

Which of the following is an invalid if-else statement?

7.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 1)
if (x == 0)
printf("inside if\n");
else
printf("inside else if\n");
else
printf("inside else\n");
}

8.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 0)
printf("true, ");
else if (x = 10)
printf("false, ");
printf("%d\n", x);
}

9.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 1;
if (a)
printf("All is Well ");
printf("I am Well\n");
else
printf("I am not a River\n");
}

10.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1;
if (x > 0)
printf("inside if\n");
else if (x > 0)
printf("inside elseif\n");
}

11.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (true);
printf("hello");
}

12.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x++)
printf("true\n");
else if (x == 1)
printf("false\n");
}

13.

What will be the output of the following C code?
#include <stdio.h>
void main()
{
int x = 5;
if (x < 1);
printf("Hello");
}

14.

What will be the output of the following C code?
#include <stdio.h>
int main()
{
int a = 1;
if (a–)
printf("True");
if (a++)
printf("False");
}

15.

What is output of below program?
#include<stdio.h>
int main()
{
    if(printf("C programming is "))
    {   
        printf("Easy");
    }
    else
    {
        printf("Hard");
    }
    return 0;
}


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For If Else Statements

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Constants

Welcome to Your Quiz: Aptitude Test C Programming For Constants

Name Email
1.

What is the output of this C code?
int main()
{
printf("AllIndiaExams\r\nclass\n");
return 0;
}

2.

Whats is the output of this C code?
void main()
{
int const k = 11;
k++;
printf("k is %d", k);
}

3.

What is the output of this C code?
int main()
{
printf("C programming %s", "Class by\n%s AllIndiaExams", "SUPER");
}

4.

For the following code snippet:
char *str = “AllIndiaExams.in\0? “training classes”;
The character pointer str holds reference to string:

5.

What is the output of this C code?
#define a 20
int main()
{
const int a = 50;
printf("a = %d\n", a);
}

6.

enum types are processed by?

7.

What is the output of this C code?
int main()
{
int var = 010;
printf("%d", var);
}

8.

What is the output of this C code?
int main()
{
const int a;
a = 32;
printf("a is %d", a);
return 0;
}

9.

Which is false?

10.

What is the output of this C code?
int main()
{
enum {ORANGE = 12, MANGO, BANANA = 11, APPLE};
printf("APPLE = %d\n", APPLE);
}


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Constants

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Data Types

Welcome to Your Quiz: Aptitude Test C Programming For Data Types

Name Email
1.

Loss in precision occurs for typecasting from____________.

2.

The format identifier ‘%i’ is also used for _____ data type?

3.

%f access specifier is used for?

4.

What is the output of this C code?
    int main()
    {
        float a = 5.477777777777;
        printf("%f", a);
    }

5.

Comment on the output of this C code?
    int main()
    {
        float f1 = 0.1;
        if (f1 == 0.1)
            printf("equal\n");
        else
            printf("not equal\n");
    }

6.

Comment on the output of this C code?
    int main()
    {
        int a[5] = {1, 2, 3, 4, 5};
        int i;
        for (i = 0; i < 5; i++)
            if ((char)a[i] == '5')
                printf("%d\n", a[i]);
            else
                printf("FAIL\n");
    }

7.

What is the size of float in a 32-bit compiler?

8.

Comment on the output of this C code?
    int main()
    {
        float f1 = 0.1;
        if (f1 == 0.1f)
            printf("equal\n");
        else
            printf("not equal\n");
    }

9.

What is the output of this C code (on a 32-bit machine)?
    int main()
    {
        int x = 10000;
        double y = 56;
        int *p = &x;
        double *q = &y;
        printf("p and q are %d and %d", sizeof(p), sizeof(q));
        return 0;
    }

10.

What is the output of this C code?
    int main()
    {
        float x = 'a';
        printf("%f", x);
        return 0;
    }

11.

Which of the datatypes have size that is variable?

12.

What is short int in C programming?

13.

What is the size of an int data type?

14.

Select the odd one out with respect to type?

15.

Which of the following % operation is invalid?

16.

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

17.

Which data type is most suitable for storing a number 65000 in a 32-bit system?

18.

What is the output of this C code?
    int main()
    {
       char chr;
       chr = 128;
       printf("%d\n", chr);
       return 0;
    }

19.

The number of digits present after decimal in float is________.

20.

Which is correct with respect to size of the datatypes?


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Data Types

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Freshers Students

Welcome to Your Quiz: Aptitude Test C Programming For Freshers Students

Name Email
1.

Will compiler produce any compilation error if same header file is included two times?

2.

How many times newtum.com is printed?
int main()
{
int a = 0;
while(a)
printf("newtum.com");
return 0;
}

3.

Which operator has the highest precedence?

4.

Which of the following range is a valid long double (Turbo C in 16 bit DOS OS) ?

5.

int main()
{
int a = 10.5;
printf("%d",a);
return 0;
}

6.

What is the job of Assembler in C programming?

7.

How many main() function we can have in our project?

8.

Libray function getch() belongs to which header file?

9.

Which of the following is executed by Preprocess?

10.

Is it possible to run program without main() function?

11.

When C Language was invented?

12.

Input/output function prototypes and macros are defined in which header file?

13.

What should be the output:
int main()
{
int a = 10/3;
printf("%d",a);
return 0;
}

14.

How many times newtum.com is printed?
int main()
{
int a = 0;
while(++a)
{
printf("newtum.com");
}
return 0;
}

15.

How many main() function we can have in our project?

16.

How may times newtum.com is printed?
int main()
{
int a = 0;
while(++a++);
{
printf("newtum.com");
}
return 0;
}

17.

What is the extension of File produced by compiler on Windows?

18.

How many loops are there in C

19.

#include <stdio.h>
int main()
{
float a = 123/100;
printf("%f", a);
return 0;
}

20.

What is output of below program?
int main()
{
const int a = 10;
printf("%d",++a);
return 0;
}


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Freshers Students

Please click on View Result Button to see the Result.



Aptitude Test C Programming Basics Level 2

Welcome to Your Quiz: Aptitude Test C Programming Basics Level 2

Name Email
1.

What is output of below program?
void main()
{
int i,j;
for(i = 0,j=0;i<5;i++)
{
printf("%d%d–",i,j);
}
}



2.

What is output of below program?
void main()
{
int i;
for(i=0; i<5; ++i++)
{
printf("Hello");
}
}



3.

How may times newtum.com is printed?
void main()
{
int a = 0;
while(++a++);
{
printf("newtum.com");
}
}



4.

What is the output of below program?
void main()
{
int i;
for(i = 0,i<5,i++)
{
printf("Hello");
}
}



5.

What is printed on console?
void main()
{
int a = 0;
while(a)
{
printf("newtum.com");
}
}



6.

What is the output of below program?
void main()
{
for( ;  ; )
for( ;  ; )
printf("Hello..");
}



7.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++);
{
printf("newtum.com");
}
}



8.

How many times newtum.com is printed on console?
void main()
{
int a = 0;
while(a++)
{
printf("newtum.com");
}
}



9.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a)
printf("newtum.com");
}



10.

How many times newtum.com is printed?
void main()
{
while(1)
{
printf("newtum.com");
}
}



11.

What is output of below program?
void main()
{
int i,j,k,count;
count=0;
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
{
count++;
}
}
printf("%d",count);
}



12.

What is output of below program?
void main()
{
for(; ;);
for(; ;);
printf("Hello");
}



13.

How many times newtum.com is printed on console?
void main()
{
int a = 0;
while(a==0)
{
printf("newtum.com");
}
}



14.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++ < 5)
printf("newtum.com");
}



15.

What is output of below program?
void main()
{
int i,j,count;
count=0;
for(i=0; i<5; i++);
{
for(j=0;j<5;j++);
{
count++;
}
}
printf("%d",count);
}



16.

How many loops are there in C



17.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++)
printf("newtum.com");
}



18.

What is output of below program?
void main()
{
int i;
for(i=0; i<5; i++);
{
printf("newtum.com");
}
}



19.

How many times newtum.com is printed?
void main()
{
while(1);
{
printf("newtum.com");
}
}



20.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(++a)
{
printf("newtum.com");
}
}




Thank You for Submitting your response for Quiz

Aptitude Test C Programming Basics Level 2

Please click on View Result Button to see the Result.



Aptitude Test C Programming Basics Level 1

Welcome to Your Quiz: Aptitude Test C Programming Basics Level 1

Name Email
1.

What should be the output:
void main()
{
int a = 10/3;
printf("%d",a);
}

2.

int main()
{
int a = 320;
char *ptr;
ptr =( char *)&a;
printf("%d",*ptr);
return 0;
}



3.

Is it true that a function may have several declaration, but only one definition.

4.

int main()
{
char arr[5]="The newtum.com";
printf("%s",arr);
return 0;
}



5.

Is it possible to run program without main() function?

6.

int main()
{
int _ = 10;
int __ = 20;
int ___ = _ + __;
printf("__%d",___);
return 0;
}



7.

void main()
{
int a = printf ("newtum.com");
printf("%d", a);
}



8.

Output of the following Program :
int main()
{
extern int i;
i = 20;
printf("%d", sizeof(i));
return 0;
}



9.

How many times newtum.com is printed?
void main()
{
int a = 0;
while(a++ < 5-++a)
printf("newtum.com");
}

10.

//This program is compiled on 32 bit DEV-C++
int main()
{
char *ptr1, *ptr2;
printf("%d %d", sizeof(ptr1), sizeof(ptr2));
return 0;
}



11.

Is the following statement a declaration or definition extern int i;

12.

main()
{
int x = 10;
{
int x = 0;
printf("%d",x);
}
}



13.

int main()
{
int a = 5;
int b = 10;
int c = a+b;
printf("%i",c);
}



14.

void main()
{
int a = 10.5;
printf("%d",a);
}

15.

int x = 10;
int main()
{
int x = 0;
printf("%d",x);
return 0;
}

16.

What is sizeof() in C?

17.

Which of the following is executed by Preprocess?

18.

How many main() function we can have in our project?

19.

Which programming language is more faster among these?

20.

int main()
{
int x;
x=10,20,30;
printf("%d",x);
return 0;
}




Thank You for Submitting your response for Quiz

Aptitude Test C Programming Basics Level 1

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Intermediate Students Level 2

Welcome to Your Quiz: Aptitude Test C Programming For Intermediate Students Level 2

Name Email
1.

What does the following declaration mean?
int (*ptr)[10];

2.

What will be the output of the program if value 25 given to scanf()?
#include<stdio.h>
int main()
{
int i;
printf("%d\n", scanf("%d", &i));
return 0;
}

3.

Which standard library function will you use to find the last occurance of a character in a string in C?

4.

What will be the output of the program (sample.c) given below if it is executed from the command line (turbo c under DOS)?
cmd> sample Good Morning
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%d %s", argc, argv[1]);
return 0;
}

5.

What will be the output of the program assuming that the array begins at the location 1002 and size of an integer is 4 bytes?
#include<stdio.h>
int main()
{
int a[3][4] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
printf("%u, %u, %u\n", a[0]+1, *(a[0]+1), *(*(a+0)+1));
return 0;
}

6.

What will be the output of the program?
#include<stdio.h>
typedef struct error {int warning, err, exception;} ERROR;
int main()
{
ERROR e;
e.err=1;
printf("%d\n", e.err);
return 0;
}

7.

Which of the following statements correct about k used in the below statement?
char ****k;

8.

What is output of below program?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
    char temp[20];
    gcvt(23.45, 3, temp);
    printf("%s", temp);
    return 0;
}

9.

What will be the output of the program in 16-bit platform (Turbo C under DOS) ?
#include<stdio.h>
int main()
{
printf("%d, %d, %d", sizeof(3.0f), sizeof('3'), sizeof(3.0));
return 0;
}

10.

A pointer union CANNOT be created

11.

Even if integer/float arguments are supplied at command prompt they are treated as strings.

12.

If the different command line arguments are supplied at different times would the output of the following program change?
#include<stdio.h>
int main(int argc, char **argv)
{
printf("%d\n", argv[argc]);
return 0;
}

13.

Point out the error in the program?
#include<stdio.h>
int main()
{
struct emp
{
char name[20];
float sal;
};
struct emp e[10];
int i;
for(i=0; i<=9; i++)
scanf("%s %f", e[i].name, &e[i].sal);
return 0;
}

14.

Point out the error in the program?
#include<stdio.h>
#include<stdlib.h>
int main()
{
unsigned char;
FILE *fp;
fp=fopen("trial", "r");
if(!fp)
{
printf("Unable to open file");
exit(1);
}
fclose(fp);
return 0;
}

15.

What will be the output of the program?
#include<stdio.h>
#define PRINT(i) printf("%d,",i)
int main()
{
int x=2, y=3, z=4;
PRINT(x);
PRINT(y);
PRINT(z);
return 0;
}

16.

What will be the output of the program (sample.c) given below if it is executed from the command line?
cmd> sample friday tuesday sunday
/* sample.c */
#include<stdio.h>
int main(int argc, char *argv[])
{
printf("%c", *++argv[2] );
return 0;
}

17.

What will be the output of the program?
#include<stdio.h>
int main()
{
const int i=0;
printf("%d\n", i++);
return 0;
}

18.

What will be the output of the program in Turbo-C ?
#include<stdio.h>
int main()
{
int arr[5], i=-1, z;
while(i<5)
arr[i]=++i;
for(i=0; i<5; i++)
printf("%d, ", arr[i]);
return 0;
}

19.

A structure can contain similar or dissimilar elements

20.

Data written into a file using fwrite() can be read back using fscanf()


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Intermediate Students Level 2

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Advanced Students​ Level 3

Welcome to Your Quiz: Aptitude Test C Programming For Advanced Students​ Level 3

Name Email
1.

What is the output of the following program?
void main()
{
int a=1;
while(a++<=1)
while(a++<=2);
printf("%d",a);
}

2.

What is the output of the following program?
void main()
{
int a,b;
a=b=1;
a=a++ + ++b;
b=b++ + ++a;
printf("%d%d",a,b);
}

3.

What is the output of the following program?
void main()
{
int a;
a=10;
while(a++<=15)
printf("%d",a);
printf("%d",a+10);
}

4.

what is the output of following program?
void main()
{
printf("One");
if(2>1)
printf("Two");
else
printf("Three");
printf("Four");
}

5.

Can a program be invoked from another program ?

6.

What is the output of the following program?
void main()
{
int a,b;
a=b=10;
while(a)
{
a=b++<=13;
printf("%d%d",a,b);
}
printf("%d%d",a+10,b+10);
}

7.

What is the output of the following program?
void xyz(int p1, int *p2)
{
++p1;
++*p2;
printf("%d%d",p1,*p2);
}
void main()
{
int a=10;
xyz(a++,&a);
xyz(a++,&a);
printf("%d",a);
}

8.

What is the output of following program?
main()
{
extern int a=5;
printf("%d",a);
return 0;
}

9.

What is the output of the following program?
void main()
{
int a;
a=100>90>80;
printf("%d",a);
}

10.

How many times the while loop will get executed?
main ( )
{
int a = 1 ;
while ( a <= 100) ;
{
printf ( a = %d, a++ ) ;
}
}

11.

What is the output of the following program?
void main()
{
int a;
a=1;
a++ * ++a;
printf("%d",a);
}

12.

What will be the output of the following program?
main( )
{
int pskills[] = { 10, 20, 30, 40, 50 };
int i, *ptr ;
ptr = pskills;
for ( i = 0 ; i <4 ; i++ )
{
fun(ptr++);
printf ("\n%", *ptr ) ;
}
}
void fun(int *i)
{
*i = *i + 1;
}

13.

what is the output of following program?
void main()
{
float a;
a=6.7;
if(a==6.7)
printf("A");
else
printf("B");
}

14.

What is the output of the following program?
void xyz(int p1, int *p2)
{
++p1;
++*p2;
printf("%d%d",p1,*p2);
}
void main()
{
int a=10;
xyz(a++,++*(&a));
xyz(a++,++*(&a));
printf("%d",a);
}

15.

what is the output of following program?
#include <stdio.h>
void main()
{
int a=1;
void xyz(int , int);
xyz(++a,a++);
xyz(a++,++a);
printf("%d",a);
}
void xyz(int x, inty)
{
printf("%d%d",x,y);
}

16.

what is the output of following program?
void main()
{
int a=80;
if(a++>80)
printf("welcome%d",a);
else
printf("hello%d",a);
}

17.

what is the output of following program?
void main()
{
int a;
a=100;
printf("%d%d",++a,a++);
}

18.

what is the output of following program?
void main()
{
int a;
a=10;
a*=10+2;
printf("%d",a);
}

19.

What is the output of the following program?
void main()
{
int a;
a=1;
while(a<=1)
if(a%2)
printf("%d",a++);
printf("%d",a+10);
}

20.

what is the output of following program?
void main()
{
int a;
a=1;
while(a–>=1)
while(a–>=0);
printf("%d",a);
}


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Advanced Students​ Level 3

Please click on View Result Button to see the Result.



Aptitude Test C Programming For Advanced Students​ Level 2

Welcome to Your Quiz: Aptitude Test C Programming For Advanced Students​ Level 2

Name Email
1.

How many storage class specifiers in "C" language?

2.

What value of c will get printed
main()
{
int a, b, c;
a = 10;
b = 20;
c = printf("%d",a) + ++b;
printf ("%d",c);
}

3.

Which one of the given option is correct?
void main()
{
int i;
i=2;
newtum:
printf("%d",i);
i=i+2;
if(i<=20)
goto newtum;
}

4.

What is the output of the following code?
#include <stdio.h>
extern int a;
main()
{
void fun();
printf("\n a=%d",a);
fun();
return 0;
}
int a=7;
void fun()
{
printf("\n in fun a=%d",a);
}

5.

What is the output of the following code?
#include <stdio.h>
extern int a;
main()
{
printf("\na=%d",a);
return 0;
}

6.

How many times the below loop will get executed?
main()
{
int i,j;
i = 10;
for (j=i==10 ; j<=10 ; j++)
{
printf("\n%d",j);
}
}

7.

How many variables scopes are there in "C" language?

8.

What is the output of the following code?
#include <stdio.h>
main()
{
static int s;
++s;
printf("%d",s);
if(s<=3)
main();
printf("%d",s);
return 0;
}

9.

What is output of below program?
#include <stdio.h>
int main(int argc, char *argv[]) {
char str1 [] = "newtum" ;
int a = 10;
char str2[12] ;
sprintf (str2, "%s-%d", str1, a) ;
printf ( "%s", str2 ) ; 
return 0;
}

10.

What is the output of the following code?
#include <stdio.h>
int a;
main()
{
printf("\n a= %d",a);
return 0;
}

11.

How many times the while loop will get executed?
main ( )
{
int a = 1 ;
while ( a <= 100) ;
{
printf ( "%d", a++ ) ;
}
}

12.

What will be the output
main()
{
char *ptr = "newtum.com";
char a =
printf("%c", ++*ptr++);
}

13.

What is the output of the following code?
#include <stdio.h>
extern int a;
main()
{
printf("\n a=%d",a);
return 0;
}
int a=5;

14.

What will be the output
main()
{
int i;
i = 10;
printf("%d\t",5,6);
printf("%d", i , i++);
}

15.

Which one of the given option is correct?
void main()
{
int i;
i=2;
cskills:
printf("%d",i);
i=i+2;
if(i<=20)
goto cskills;
}

16.

What are storage classes in 'C' language? choose multiple-
a. auto keyword
b. static keyword
c. register keyword
d. extern keyword
e. automatic
f. static

17.

What is the output of the following code?
#include <stdio.h>
main()
{
int i;
for(i=0;i<5;i++)
{
static int a=0;
int b=0;
a++;
b++;
printf("%d %d",a,b);
}
return 0;
}

18.

What will be the output of the following program?
main()
{
printf("%c","Newtum"[4]);
}

19.

What is the output of the following code?
#include <stdio.h>
extern int a=5;
main()
{
void fun();
printf("\n a=%d",a);
fun();
return 0;
}
int a;
void fun()
{
printf("\n in fun a=%d",a);
}

20.

What the below statement will print if a=10 and b = 20?
printf("%d",a==b);


Thank You for Submitting your response for Quiz

Aptitude Test C Programming For Advanced Students​ Level 2

Please click on View Result Button to see the Result.