C C++ Quiz ( By Aslam Jainul ) Online Test

You must specify void in parameters if a function does not have any arguments.


Overloaded functions are


In case of pass by reference


Study the following piece of code and choose the best answer

int x=5, y=3, z;

a=addition(x,y)


Which of the following is not a jump statement in C++ ?


On combining the following statements, you will get

char*p;

p=malloc(100);


How long the following program will run?

#include<stdio.h>

int main(){

printf("\n India Rockzzzz");

main();

return 0;

}


A switch statement cannot include


Would the following program compile?

#include<stdio.h>

int main(){

int a=10,*j;

void *k;

j=k=&a;

j++;

k++;

printf("\n%u%u",j,k);

}


If the following program (myprog) is run from the command line as:

i like love but i don't like lovers

What would be the output?

#include<stdio.h>

int main(int argc, char *argv[]){

while(sizeof argv)

printf("%s",argv[--sizeof argv]);

return 0;

}


What will be output of following c program?

#include<stdio.h>

int main(){

char huge * far *p;

printf("%d %d %d",sizeof(p),sizeof(*p),sizeof(**p));

return 0;

}


_____ can be used as a variable number of parameters or a variable which stores variable number of arguments.


What would be the output of the following program?

#include<stdio.h>

int main(){

int y=128;

const int x=y;

printf("%d",x);

return 0;

}


Observe the following block of code and determine what happens when x=2?

switch (x){

case 1:

case 2:

case 3:

cout<< "x is 3, so jumping to third branch";

goto thirdBranch;

default:

cout<<"x is not within the range, so need to say Thank You!";

}


Which of the following is false for switch statement in C++ ????


Which of the following header file does not exist ??


The size of following variable is not 4 bytes in 32 bit systems


Identify the correct statement regarding scope of variables

































































































Tags:

Interview  C

Discussion
Aslam Jainul
Expert In C , C++ and Java
User
3 Followers
Tests: 4

Your Facebook Friends on WizIQ

More Tests By Author

Quiz about Computer.. ( By Connect Sastra )
10 Questions | 216 Attempts

Simple C,C++ Quiz (By Connect Sastra )
10 Questions | 2384 Attempts

C Programming Test Online (By Connect Sastra Team )
10 Questions | 676 Attempts