'C' Language Sample Paper ----BCA-1
Q1.C was originally developed by………
(a)Dennis Ritchie (b)bell laboratories
(c)both a&b (d)none ( )
Q2.C was developed in the year ……….
(a)1975 (b)1974 (c)1972 (d)1956 ( )
Q3.C is a ……level programming language.
(a)low b)high (c)medium (d)a,b ( )
Q4.A program can be viewed as a group of building blocks called……….
(a)instruction (b)function (c)library function (d)all ( )
Q5.A c program cantain …….section.
(a)one (b)two
(c)one or more (d)none ( )
Q6.C mathematical function are defined in header file.
(a)conio.h (b)math.c (c)math.h (d)math.txt ( )
Q7.’==’ This sign acts as…..
(a)arithmetic (b)logical (c)assignment (d)none ( )
Q8.The template is terminate with a…..
(a)dot operator (b)semicolon
(c)tag name (d)colon sign
(a)a (b)b (c)c (d)d ( )
Q9.Scanf() is an______statement.
(a)Attribute (b)interactive (c)both a&b (d)none
(a)a (b)b (c)c (d)d ( )
Q10.Tick correct string constant ….
(a)”hello” (b)”1987’ (c)”?......!” (d)’5+3’
(a)a,b (b)a,c (c)a,d (d)c,d ( )
Q11.Which statement is false.
(a)printf(“sum of two no.+%d\n”,sum); (b)printf(‘%s’name)
(c)printf(“enter your name”); (d)printf(“enter the value of b:-,&b);
(a)b,c (b)a,d (C)b,d (d)a,b ( )
Q12.Which statement is true …
(a)#include”stdio.h” (b)#include
(c)#include”conio.h” (d)#include
(a)a,b,c,d (b)a,c (c)b,d (d)a,d ( )
Q13.#include is used for…….
(a)to define a macro (b)to include the content of file
(c)to include undefined macro (d)none ( )
Q14.The mantissa is either……
(a)real (b)float (c)decimal (d)all ( )
Q15.Which of these is a advantage of array.
(a)data item stored under single variable name. (b)array saves the memory space.
(c)arrange the data in particular order. (d)all of above. ( )
Q16.Classification of function as…
(a)built in (b)user define function
(c)standard function (d)all of above ( )
Q17.External variable are…….
(a)global (b)local (c)static (d)none ( )
Q18.fastest storage class is……
(a)External storage (b)static storage class
(c)automatic storage (d)register variable ( )
Q19.Strcat is used to…….
(a)Find the length of string (b)concat to string
(c)compare to string (d)copy a string ( )
Q20.Compiler to …..certain mistake you might make.
(a)catch (b)code (c)prototype (d)arranges ( )
Q21.?: is which type of operator.
(a)unary (b)binary (c)tenary (d)none ( )
Q22.A variable which holds the memory location of the variable called……..
(a)function (bpointer (c)structure (d)array ( )
Q23.A loop that executes the statement at least one,even if the condition fails for the first.
(a)for (b)while (c)do_while (d)array ( )
Q24.Size of() operator returns the size of data type in…….
(a)bits (b)bytes (c)kilobytes (d)all the above ( )
Q25.Matrix is called…..
(a)single dimension array (b)double dim.array (c)both a&b (d)none of above ( )
Q26.The….is a midular programming concept which consist of instructions.
(a)array (b)function (c)program (d)process ( )
Q27.Declaration of a function before it is used is called.
(a)function definition (b)function prototype (c)function declaration (d)none ( )
Q28.C program should be start as-
(a)array (b)function (c)structure (d)none ( )
Q29.The library function getch()…..
(a)return character when any key is pressed. (b)return a character when enter is pressed.
(c)return and display a character on the screen when any key is pressed. (d)return none of the obove.
Q30.A variable name ……
(a)first_tag (b)char (c)price$ (d)int_type
(a)a,a (b)a,c (c)a,b (d)a,d ( )
Q31.which type of variables is initialized automatically.
(a)automatic (b)external (c)static (d)register ( )
Q32.When the function call by itself is called.
(a)loop (b)recursion (c)structure (d)union ( )
Q33.Preprocessor directives are used in c program.
(a)including files (b)conditional compliation
(c)conditional statements (d)none ( )
Q34.The function which returns the keying in character in the screen is….
(a)getch() (b)getche() (c)getchar() (d)clrscr() ( )
Q35.Which is not the advantage of pointer?
(a)pointer are pointing to different data type and structures.
(b)To return single value via function. (c)To achive a clarity and simplicity.
(d)To returns only integer value via function.
(a)A (b)b (c)c (d)d ( )
Q36.Which is not linear data structure.
(a)array (b)tree (c)linked list (d)queen ( )
Q37.Which two condition solve a problem recursively.
(a)process/stopping ` (b)start/stopping (c)write in a recursive/stopping (d)none
Q38.The tawer of Hanoi is a game played with …….poles.
(a)one (b)two (c)three (d)four
Q39.Which means that a function recives copies of the values of its arguments.
(a)call by value (b)call by refrence
(c)arguments with return value (d)no argument no return value ( )
Q40.The …..arguments may differ from one function call to another.
(a)formal (b)actual (c)a,b (d)none ( )
Q41.To write in correct sequence.
(a)link section (b)global declaration (c)main()function section (d)executable section
(e)documentiation section (f)definition section
(a)f,a,g,b,c,d,e (b)g,b,a,c,d,e,f (c)b,a,c,d,e,f,g (d)d,e,f,g,b,c,a ( )
Q42.Write true and false….
(a)float to int causes truncation of the fractional part.( )
(b)double to float causes rounding of digits.( )
(c)long int to int causes dropping of the access higher order bits.( )
(d)one of the operands is real and the other is integer called type cast.( )
Q43.Write true and false….
(a)global variable can be used any where.( )
(b)another global variable is a second global variable.( )
(c)privatevar is a “private”global variable.( )
(d)local var is a local variable within the external function f( ).( )
Q44.Write true and false…
(a)one source file to store a value in one vaiable named ststic variable.( )
(b)and then have another function in another source file read from a different variable
named external.( )
(c)variable is declared in those other file (s)with an external declaration.( )
(d)source file called extern variables.h.( )
Q45.Write true and false…
(a)the keyword extern is optional in some c compilers. ( )
(b)binary operators use two operands. ( )
(c)unary operator use a single operands ( )
(d)ternary operator use two operands. ( )
Q46.Match the following….
(a)int or signed int (a)0 to 4,294,967,295
(b)unsigned int (b)-2,147,483,648 to 2,147,483,647
(c)long int or signed long int (c)0 to 65535
(d)unsigned long int (d)-32,768 to 32,767
Q47.which is not a output function….
(a)printf() (b)puts(),putchar() (c)putch (d)getche()
(a)a (b)b (c)c (d) ( )
Q48.Write true and false…
(a)main() ( )
(b)int main (void) ( )
(c)int display(int ,int); ( )
(d)int display point( ); ( )
Q49.Match the following….
(a)bit wise AND (a)<<= >>=
(b)bitwise shift operators (b)&
(c)assignment operators (c)<< >>
(d)relational operators (d)=,+=,-=,*=,/=,%=,&=,|=,<<=,>>= ( )
(a)a-b,b-c,c-d,d-a (b)a-b,b-d,c-b,d-a (c)a-b,b-a,c-d,d-a (d)a-c,b-a,c-d,d-b
Q50.Which is not a jumping statement…
(a)break statement (b)while statement (c)continue statement (d)goto statement
(a)a (b)b (c)c (d)d ( )
Q51Match the following….
(a)strcat() (a)compare two string
(b)strcpy() (b)copies a string into another
(c)strlen () (c)append one string at the end of another
(d)strcmp() (d)find length of string
(a)a-b,b-c.c-d,d-a (b)a-c,b-b,c-d,d-a (c)a-d,b-c,c-b,d-a (d)a-b,b-c,c-a,d-d ( )
Q52.Write true or false….
(a)a structure is a collection of data items of different data type.
(b)it has declaration and definition. (c)the key word struct is used.
(d)a structure name is know as tag. (e)it is a short hand notation of the declaration.
(f)a structure may contain bit fields.
(a)all true (b)all false (c)a,b,c,d true,e false (d)f,e,d,c true,b,a false ( )
Q53.Which one is valid or invalid.
(a)printf(); (b)c=sum(a,b); (c)x=y*sum(a,b); (d)sum();
(a)all valid (b)all invalid (c)a,b,c valid,d invalid (d)b,c,d valid,a invalid ( )
Q54.Which one is valid or invalid.
(a)while(a>=20) (b)while(a>=5&&b<=10) (c)while(a++>10) (d)while(a++>0 && a>0 or a>0)
(a)all valid (b)all invalid (c)a,b,d valid,c invalid (d)a,c valid,b,d invalid ( )
Q55.Write is the result of the following program. 4*(3+2)*3
(a)72 (b)62 (c)76 (d)60 ( )
Q56.How many times will the print statement will be executed.
Void main( ) {
Int a,b,c;
b=2;
a=2*(b++);
c=2*(++b);
(a)a=4,c=6 (b)a=3,c=8 (c)a=3,c=7 (d)a=4,c=8 ( )
Q57.What is the result of the following program?
When a=9,b=12,c=3
x=a-b/3+c*2-1;
(a)21 (b)10 (c)20 (d)error ( )
Q58.What is the result of the following program?
Main()
{ int a;
a=0;
while(a<10); {
printf(“\n value is %d”,a);
a++; }
getch(); } ( )
(a)it will printf 0-10 values (b)it will printf 0-9 values (c)give error (d)no result
Q59.Match the following….
(a)getchar( ) (a)enter a char from the standard input device.
(b)putchar( ) (b)Acompanion function which one character to the standard output.
(c)gets( ) (c)the string entered from the keyboard.
(d)puts( ) (d)function transfer of string between the computer and the standard I/Odevice.
(a)a-b,b-c,c-d,d-a (b)a-d,b-c,c-b,d-a (c)a-b,b-a,c-c,d-d (d)none ( )
Q60.Which of the following are invalid..
(a)A variable also called an object.
(b)The assignment operators =assigns a value to a variable.
(c)The assignment operators there for group from R->L.
(d)A string constant is a sequence of character enclosed within single quotes.
(a)all valid (b)all invalid (c)a,c,d valid b invalid (d)b valid,a,c,d invalid ( )
Q61.What is the output of the following program:
Main()
{ int I;
for(i=0;i<10;i=i+1)
printf(“I is %d\n”,i); }
(a)0-9print (b)1-10printf (c)error (d)1-9print ( )
Q62. What is the output of the following program:
Main()
{ int i=10;
printf(“integer :-%d\n”,size of(i)); }
(a)2 (b)4 (c)8 (d)10 ( )
Q63. What is the output of the following program:
Main()
{ int i=10,j=12,c,d;
i++;
c=j++ + i;
d=++i + j++; }
(a)c=24,d=25 (b)c=23,d=25 (c)c=25,d=26 (d)c=22,d=24 ( )
Q64. What is the output of the following program:
Main()
{ int k=35;
printf(%d%d%d”,k==35,k=40,k>40) }
(a)k=35 (b)k=40 (c)k=35,40 (d)error ( )
Q65. What is the output of the following program:
Main()
{ int k=0;
while(k++<5)
printf(“%d\n”,k); }
(a)1-5print (b)0-5print (c)0-6print (d)1-6print ( )
Q66. What is the output of the following program:
Void main();
Main()
{ fun1();
fun1(); }
void fun1()
{ auto int i=2;
printf(“%d\n”,i);
i=i+2;
return(i); }
(a)2,2 (b)2,4 (c)2,3 (d)2,6 ( )
Q67. What is the output of the following program:
Void main();
Main()
{
fun1();
fun1(); }
void fun1()
{ static int i=2;
printf(“%d\n”,i);
i=i+2;
return(i); }
(a)2,2 (b)4 (c)2,4 (d)3 ( )
Q68.What is the output of the following program:
Main()
{ int m,n;
for(m=1;m<=3;m++)
{ for(n=1;n<=2;n++)
{ if(m==n)
continue; printf(“%d %d\n”,m,n); } } }
(a)12,21,31,32 (b)12,21,11,22,31 (c)11,21,31,32 (d)12,11,21,31 ( )
Q69. What is the output of the following program:
Main()
{ int i=5,*ip;
ip=&i;
printf(“%d\n”,*&i); }
(a)6 (b)5 (c)1001 (d)7 ( )
Q70. What is the output of the following program:
Main()
{ int i=3,*j,**k;
j=&i;
k=&i;
printf(“\n value of i=%d”,i);
printf(“\n value of *j=%d”,*j);
printf(“\n value of **k=%d”,**k); }
(a)3,4,5 (b)3,3,3 (c)3,2,1 (d)none ( )
Q71. What is the output of the following program:
Main()
{ int y;
y=mul(10,5); }
int mul(int x,int y)
{ int p;
p=x*y;
return(p); }
(a)10,5 (b)5,10 (c)10 (d)50 ( )
Q72. What is the output of the following program:
int *larger(int *,int *);
Main()
{ int a=10;
int b=20;
int *p;
p=larger(&a,&b);
printf(“%d”,*p); }
int *larger(int *x,int *y)
{ if(*x>*y)
return(x);
else
return(y); }
(a)10 (b)10,20 (c)20 (d)*p ( )
Q73.Which statement are not valid.
(a)return(a,b); (b)return(m,34); (c)return(13.1); (d)return(2,m,c*d);
(a)b (b)a (c)d (d)c ( )
Q74.The link between a …….and a …….is established using the member operator.
(a)class,member (b)statement,variable (c)member,variable (d)none
Q75.which is the out put of the following program…
Main()
{ int a=1,a=2,a=3;
printf(“a=%d”,a); }
(a)a=1 (b)a=3 (c)a=2 (d)a=1,a=2,a=3 ( )
(a)Dennis Ritchie (b)bell laboratories
(c)both a&b (d)none ( )
Q2.C was developed in the year ……….
(a)1975 (b)1974 (c)1972 (d)1956 ( )
Q3.C is a ……level programming language.
(a)low b)high (c)medium (d)a,b ( )
Q4.A program can be viewed as a group of building blocks called……….
(a)instruction (b)function (c)library function (d)all ( )
Q5.A c program cantain …….section.
(a)one (b)two
(c)one or more (d)none ( )
Q6.C mathematical function are defined in header file.
(a)conio.h (b)math.c (c)math.h (d)math.txt ( )
Q7.’==’ This sign acts as…..
(a)arithmetic (b)logical (c)assignment (d)none ( )
Q8.The template is terminate with a…..
(a)dot operator (b)semicolon
(c)tag name (d)colon sign
(a)a (b)b (c)c (d)d ( )
Q9.Scanf() is an______statement.
(a)Attribute (b)interactive (c)both a&b (d)none
(a)a (b)b (c)c (d)d ( )
Q10.Tick correct string constant ….
(a)”hello” (b)”1987’ (c)”?......!” (d)’5+3’
(a)a,b (b)a,c (c)a,d (d)c,d ( )
Q11.Which statement is false.
(a)printf(“sum of two no.+%d\n”,sum); (b)printf(‘%s’name)
(c)printf(“enter your name”); (d)printf(“enter the value of b:-,&b);
(a)b,c (b)a,d (C)b,d (d)a,b ( )
Q12.Which statement is true …
(a)#include”stdio.h” (b)#include
(c)#include”conio.h” (d)#include
(a)a,b,c,d (b)a,c (c)b,d (d)a,d ( )
Q13.#include is used for…….
(a)to define a macro (b)to include the content of file
(c)to include undefined macro (d)none ( )
Q14.The mantissa is either……
(a)real (b)float (c)decimal (d)all ( )
Q15.Which of these is a advantage of array.
(a)data item stored under single variable name. (b)array saves the memory space.
(c)arrange the data in particular order. (d)all of above. ( )
Q16.Classification of function as…
(a)built in (b)user define function
(c)standard function (d)all of above ( )
Q17.External variable are…….
(a)global (b)local (c)static (d)none ( )
Q18.fastest storage class is……
(a)External storage (b)static storage class
(c)automatic storage (d)register variable ( )
Q19.Strcat is used to…….
(a)Find the length of string (b)concat to string
(c)compare to string (d)copy a string ( )
Q20.Compiler to …..certain mistake you might make.
(a)catch (b)code (c)prototype (d)arranges ( )
Q21.?: is which type of operator.
(a)unary (b)binary (c)tenary (d)none ( )
Q22.A variable which holds the memory location of the variable called……..
(a)function (bpointer (c)structure (d)array ( )
Q23.A loop that executes the statement at least one,even if the condition fails for the first.
(a)for (b)while (c)do_while (d)array ( )
Q24.Size of() operator returns the size of data type in…….
(a)bits (b)bytes (c)kilobytes (d)all the above ( )
Q25.Matrix is called…..
(a)single dimension array (b)double dim.array (c)both a&b (d)none of above ( )
Q26.The….is a midular programming concept which consist of instructions.
(a)array (b)function (c)program (d)process ( )
Q27.Declaration of a function before it is used is called.
(a)function definition (b)function prototype (c)function declaration (d)none ( )
Q28.C program should be start as-
(a)array (b)function (c)structure (d)none ( )
Q29.The library function getch()…..
(a)return character when any key is pressed. (b)return a character when enter is pressed.
(c)return and display a character on the screen when any key is pressed. (d)return none of the obove.
Q30.A variable name ……
(a)first_tag (b)char (c)price$ (d)int_type
(a)a,a (b)a,c (c)a,b (d)a,d ( )
Q31.which type of variables is initialized automatically.
(a)automatic (b)external (c)static (d)register ( )
Q32.When the function call by itself is called.
(a)loop (b)recursion (c)structure (d)union ( )
Q33.Preprocessor directives are used in c program.
(a)including files (b)conditional compliation
(c)conditional statements (d)none ( )
Q34.The function which returns the keying in character in the screen is….
(a)getch() (b)getche() (c)getchar() (d)clrscr() ( )
Q35.Which is not the advantage of pointer?
(a)pointer are pointing to different data type and structures.
(b)To return single value via function. (c)To achive a clarity and simplicity.
(d)To returns only integer value via function.
(a)A (b)b (c)c (d)d ( )
Q36.Which is not linear data structure.
(a)array (b)tree (c)linked list (d)queen ( )
Q37.Which two condition solve a problem recursively.
(a)process/stopping ` (b)start/stopping (c)write in a recursive/stopping (d)none
Q38.The tawer of Hanoi is a game played with …….poles.
(a)one (b)two (c)three (d)four
Q39.Which means that a function recives copies of the values of its arguments.
(a)call by value (b)call by refrence
(c)arguments with return value (d)no argument no return value ( )
Q40.The …..arguments may differ from one function call to another.
(a)formal (b)actual (c)a,b (d)none ( )
Q41.To write in correct sequence.
(a)link section (b)global declaration (c)main()function section (d)executable section
(e)documentiation section (f)definition section
(a)f,a,g,b,c,d,e (b)g,b,a,c,d,e,f (c)b,a,c,d,e,f,g (d)d,e,f,g,b,c,a ( )
Q42.Write true and false….
(a)float to int causes truncation of the fractional part.( )
(b)double to float causes rounding of digits.( )
(c)long int to int causes dropping of the access higher order bits.( )
(d)one of the operands is real and the other is integer called type cast.( )
Q43.Write true and false….
(a)global variable can be used any where.( )
(b)another global variable is a second global variable.( )
(c)privatevar is a “private”global variable.( )
(d)local var is a local variable within the external function f( ).( )
Q44.Write true and false…
(a)one source file to store a value in one vaiable named ststic variable.( )
(b)and then have another function in another source file read from a different variable
named external.( )
(c)variable is declared in those other file (s)with an external declaration.( )
(d)source file called extern variables.h.( )
Q45.Write true and false…
(a)the keyword extern is optional in some c compilers. ( )
(b)binary operators use two operands. ( )
(c)unary operator use a single operands ( )
(d)ternary operator use two operands. ( )
Q46.Match the following….
(a)int or signed int (a)0 to 4,294,967,295
(b)unsigned int (b)-2,147,483,648 to 2,147,483,647
(c)long int or signed long int (c)0 to 65535
(d)unsigned long int (d)-32,768 to 32,767
Q47.which is not a output function….
(a)printf() (b)puts(),putchar() (c)putch (d)getche()
(a)a (b)b (c)c (d) ( )
Q48.Write true and false…
(a)main() ( )
(b)int main (void) ( )
(c)int display(int ,int); ( )
(d)int display point( ); ( )
Q49.Match the following….
(a)bit wise AND (a)<<= >>=
(b)bitwise shift operators (b)&
(c)assignment operators (c)<< >>
(d)relational operators (d)=,+=,-=,*=,/=,%=,&=,|=,<<=,>>= ( )
(a)a-b,b-c,c-d,d-a (b)a-b,b-d,c-b,d-a (c)a-b,b-a,c-d,d-a (d)a-c,b-a,c-d,d-b
Q50.Which is not a jumping statement…
(a)break statement (b)while statement (c)continue statement (d)goto statement
(a)a (b)b (c)c (d)d ( )
Q51Match the following….
(a)strcat() (a)compare two string
(b)strcpy() (b)copies a string into another
(c)strlen () (c)append one string at the end of another
(d)strcmp() (d)find length of string
(a)a-b,b-c.c-d,d-a (b)a-c,b-b,c-d,d-a (c)a-d,b-c,c-b,d-a (d)a-b,b-c,c-a,d-d ( )
Q52.Write true or false….
(a)a structure is a collection of data items of different data type.
(b)it has declaration and definition. (c)the key word struct is used.
(d)a structure name is know as tag. (e)it is a short hand notation of the declaration.
(f)a structure may contain bit fields.
(a)all true (b)all false (c)a,b,c,d true,e false (d)f,e,d,c true,b,a false ( )
Q53.Which one is valid or invalid.
(a)printf(); (b)c=sum(a,b); (c)x=y*sum(a,b); (d)sum();
(a)all valid (b)all invalid (c)a,b,c valid,d invalid (d)b,c,d valid,a invalid ( )
Q54.Which one is valid or invalid.
(a)while(a>=20) (b)while(a>=5&&b<=10) (c)while(a++>10) (d)while(a++>0 && a>0 or a>0)
(a)all valid (b)all invalid (c)a,b,d valid,c invalid (d)a,c valid,b,d invalid ( )
Q55.Write is the result of the following program. 4*(3+2)*3
(a)72 (b)62 (c)76 (d)60 ( )
Q56.How many times will the print statement will be executed.
Void main( ) {
Int a,b,c;
b=2;
a=2*(b++);
c=2*(++b);
(a)a=4,c=6 (b)a=3,c=8 (c)a=3,c=7 (d)a=4,c=8 ( )
Q57.What is the result of the following program?
When a=9,b=12,c=3
x=a-b/3+c*2-1;
(a)21 (b)10 (c)20 (d)error ( )
Q58.What is the result of the following program?
Main()
{ int a;
a=0;
while(a<10); {
printf(“\n value is %d”,a);
a++; }
getch(); } ( )
(a)it will printf 0-10 values (b)it will printf 0-9 values (c)give error (d)no result
Q59.Match the following….
(a)getchar( ) (a)enter a char from the standard input device.
(b)putchar( ) (b)Acompanion function which one character to the standard output.
(c)gets( ) (c)the string entered from the keyboard.
(d)puts( ) (d)function transfer of string between the computer and the standard I/Odevice.
(a)a-b,b-c,c-d,d-a (b)a-d,b-c,c-b,d-a (c)a-b,b-a,c-c,d-d (d)none ( )
Q60.Which of the following are invalid..
(a)A variable also called an object.
(b)The assignment operators =assigns a value to a variable.
(c)The assignment operators there for group from R->L.
(d)A string constant is a sequence of character enclosed within single quotes.
(a)all valid (b)all invalid (c)a,c,d valid b invalid (d)b valid,a,c,d invalid ( )
Q61.What is the output of the following program:
Main()
{ int I;
for(i=0;i<10;i=i+1)
printf(“I is %d\n”,i); }
(a)0-9print (b)1-10printf (c)error (d)1-9print ( )
Q62. What is the output of the following program:
Main()
{ int i=10;
printf(“integer :-%d\n”,size of(i)); }
(a)2 (b)4 (c)8 (d)10 ( )
Q63. What is the output of the following program:
Main()
{ int i=10,j=12,c,d;
i++;
c=j++ + i;
d=++i + j++; }
(a)c=24,d=25 (b)c=23,d=25 (c)c=25,d=26 (d)c=22,d=24 ( )
Q64. What is the output of the following program:
Main()
{ int k=35;
printf(%d%d%d”,k==35,k=40,k>40) }
(a)k=35 (b)k=40 (c)k=35,40 (d)error ( )
Q65. What is the output of the following program:
Main()
{ int k=0;
while(k++<5)
printf(“%d\n”,k); }
(a)1-5print (b)0-5print (c)0-6print (d)1-6print ( )
Q66. What is the output of the following program:
Void main();
Main()
{ fun1();
fun1(); }
void fun1()
{ auto int i=2;
printf(“%d\n”,i);
i=i+2;
return(i); }
(a)2,2 (b)2,4 (c)2,3 (d)2,6 ( )
Q67. What is the output of the following program:
Void main();
Main()
{
fun1();
fun1(); }
void fun1()
{ static int i=2;
printf(“%d\n”,i);
i=i+2;
return(i); }
(a)2,2 (b)4 (c)2,4 (d)3 ( )
Q68.What is the output of the following program:
Main()
{ int m,n;
for(m=1;m<=3;m++)
{ for(n=1;n<=2;n++)
{ if(m==n)
continue; printf(“%d %d\n”,m,n); } } }
(a)12,21,31,32 (b)12,21,11,22,31 (c)11,21,31,32 (d)12,11,21,31 ( )
Q69. What is the output of the following program:
Main()
{ int i=5,*ip;
ip=&i;
printf(“%d\n”,*&i); }
(a)6 (b)5 (c)1001 (d)7 ( )
Q70. What is the output of the following program:
Main()
{ int i=3,*j,**k;
j=&i;
k=&i;
printf(“\n value of i=%d”,i);
printf(“\n value of *j=%d”,*j);
printf(“\n value of **k=%d”,**k); }
(a)3,4,5 (b)3,3,3 (c)3,2,1 (d)none ( )
Q71. What is the output of the following program:
Main()
{ int y;
y=mul(10,5); }
int mul(int x,int y)
{ int p;
p=x*y;
return(p); }
(a)10,5 (b)5,10 (c)10 (d)50 ( )
Q72. What is the output of the following program:
int *larger(int *,int *);
Main()
{ int a=10;
int b=20;
int *p;
p=larger(&a,&b);
printf(“%d”,*p); }
int *larger(int *x,int *y)
{ if(*x>*y)
return(x);
else
return(y); }
(a)10 (b)10,20 (c)20 (d)*p ( )
Q73.Which statement are not valid.
(a)return(a,b); (b)return(m,34); (c)return(13.1); (d)return(2,m,c*d);
(a)b (b)a (c)d (d)c ( )
Q74.The link between a …….and a …….is established using the member operator.
(a)class,member (b)statement,variable (c)member,variable (d)none
Q75.which is the out put of the following program…
Main()
{ int a=1,a=2,a=3;
printf(“a=%d”,a); }
(a)a=1 (b)a=3 (c)a=2 (d)a=1,a=2,a=3 ( )
Comments
Post a Comment