Wednesday, April 29, 2009

second mid online bits

C C C C B A B D C A
}
A. 65 66 67
B. A B C D
C. 65 66 67 68
D. A B C
15. "a+" is used to
A. read a file
B. read and append a file
C. append a file
D. Write into a file
16. The general formate of fscanf( ) is
A. fscanf(fp,controlstring,list);
B. fscanf(fp,list);
C. fprintf(fp, controlstring, list);
D. fscanf(fp,controlstring);
17. #include
main( )
{ char s[ ]={'a', 'b','c',' \n ', 'c', '\0'};
char *p, *str, *str1;
p=&s[3];str=p;str1=s;
printf("%d",++*p+ ++*str1-32);
}
A. b
B. a
C. Compiler error
D. M
18. The body of union should end with
A. colon( :)
B. Period ( . )
C. Semicolon( ; )
D. comma( , )
19. main()
{ int a=5,b,*c; c=&a;b=*c;
printf("\n value of a=%d & b=%d", a,b)}
A. a=5,d=5
B. a=6,d=6
C. a=4, b=4
D. a=3,b=3
20. Functions do not require
A. Formal parameters
B. Local parameters
C. Global parameters
D. Universal parameters



D A A C A B D D B A
A A D A B A D C A A



1. struct{ int I;
float j;} s; size(s) will be
A. 6 bytes
B. 0 bytes
C. 2 bytes
D. 4 bytes
2. Which of the following is used with Printf( ) function for printing the Address of a variable
A. %d
B. %u
C. %f
D. %c
3. Which of the following allows a program to read from or write to files at Command prompt
A. in out direction
B. in direction
C. out direction
D. redirection
4. An array is represented in Memory by using a
A.Sequential map
B. Parallel map
C. element map
D. circular map
5. which of the following mode opens a binary file in write mode
A. getw( )
B. putw( )
C. wb( write )
D. feof( )
6. Struct a { int I;
float j;
}; Which of the following syntax is correct to declare a struct variable
A. Struct a t;
B. union struct a;
C. struct union a;
D. union a t;
7. Which of the following operator is used the pointer to access he members of a structure
A. &&
B. ( .)
C. *
D. ->
8. main( )
{char s[6]="HELLO"
printf("%d", s[6]);
}
output is
A. 45
B. compiler error
C. 34
D. 0
9. main( )
{ char *str1="abcd";
char str2[ ]="abcd";
printf("%d%d%d", sizeof(str1),sizeof(str2),sizeof("abcd"));}
A. 2 5 5
B. 5 5 2
C. Compiler error
D. 5 2 5
10. If struct member is array, then an individual array element can be accessed by writting a variable
A. Stucture(member)
B. member(datatype)
C. member(structure)
D. member(expression)
11. The general form of array declaration is
A. Type array name[type]
B. Type variable name[size]
C. Type data name[type]
D. Type data name[size]
12. The variable can be accessed by a Pointer using the Operators
A. & and -
B. & and *
C. // and ++
D. & and +
13. Which is not true among the following
A. Brazil( ) is a user defined function
B. Printf( ) is a Library function
C. A function can be called from another function
D. A function can be defined in another function
14. A block of memory is allocated using the function
A. falloc( )
B. dalloc( )
C. malloc( )
D. calloc( )
15. In which of the following header files the standard file pointers have been defined
A. stdconio.h
B. stdpointer.h
C. stdstream.h
D. stdio.h
16 Which of the following function places cursur at appropriate position on the screen
A. go to( )
B. goto xy( )
C. go ( )
D. goto screen( )
17. The function that is used to detect the end of file is
A. feof( )
B. fgetch( )
C. go ( )
D. goto screen( )
18. "a+" is used to
A. read a file
B. append a file
C. read and append a file
D. Write in to file
19. Which of the following is a costruct that allows memory to be shared by different types of data
A. union
B. struct
C. Bit field
D. type def
20. Which of the following sign is used to access the structure members
A. ->
B. &&
C. ( . )
D. *



A B D A C A D B A D
B B D C D D A C A C



1. In union all members use
A. no location
B. same location
C. different location
D. no stroage
2. The process of call a function using pointers to pass the address of varaibles is known as
A. call by argument
B. call by parameter
C. call by value
D. call by reference
3. #include
main( )
{ char s[ ]={'a','b','c','\n', 'c', '\0'};
char *p,*str, *str1;
p=&s[3]; str=p; str11=s;
printf("%d",++ *p+ ++*str1-32);}
A. a
B. b
C. M
D. Compiler error
4. The arguments of calling functions are called
A. parameter arguments
B. Function call
C. Actual arguments
D. Formal arguments
5. Which of the following data structure used to process multiple elements with the same data types when number of such elements are know
A. Graph
B. Array
C. Atack
D. Quene
6. Which is not true among the following
A. Pointers decrease the Execution speed
B. Pointers are more efficient the arrays
C. Pointers are more efficient in handling the data tables
D. Pointers reduces the length and complexity of a program
7. #include
main( )
{
struct xx
{
int x;
struct yy
{char s; struct xx *p;
};
struct yy *q;
};
}
A. Compiler Error
B. m xy
C. yy
D. xx
8. struct aaa{ struct aaa *prev;
int i;
struct aaa*next;};
main( )
{
struct aaa abc,defghi,jkl;
int x=100;
abc.i=0;abc.prev=&jkl;abc.next=&def;
def.i=1 ;def.prev=&abc;def.next=&ghi;
ghi.i=2 ;ghi.prev=&def ;ghi.next=&jkl;
jkl.i=3 ;jkl.prev=&ghi; jkkl.next=&abc;
x=abc.next->next prev->next-> i;
printf("%d",x);}
A.2
B. Compiler error
C. 3
D. 4
9. The type def Statement is used for
A. Declaring user defined data types
B. Declaring variant data types
C. for assigning values to vareiables
D. for type casting of variables
10. main( )
{ FILE *fp;
fp=fopen("test", "r");
}
A. A structure which contains a char pointer to first character in the file
B. The first character in the file
C. The name of the file
D. The last character in the file
11. Which of the following function is used for storing information in a disk file
A. fprintf( )
B. fscanf( )
C. printf( )
D. Scanf( )
12. Portion of memory to be shared by different types of data is
A. field
B. array
C. struct
D. union
13. The fscanf( ) statement reads data from
A. key board
B. file
C. scanner
D. program
14. The general format os fprintf( ) function is
A. fprintf(control string, list)
B. fprintf(fp,list)
C. fprintf(fp,"controlstring")
D. fprintf(fp,controlstring,list)
15 Which of the following function takes the otal number of data and size each data
A. free
B. realloc
C. malloc
D. calloc
16. main( )
{char s[6]="HELLO"
printf("%d",s[6]);
}
output is
A. 45
B. compiler error
C. 34
D. 0
17. main( )
{char *str1="abcd";
char str2[ ]="abcd";
printf("%d%d%d",sizeof(str1),sizeof(str2),sizeof("abcd"));}
A. 5 2 5
B. 5 5 2
C. compiler error
D. 2 5 5
18. main( )
{ int *j;
int i=10;
j=&i;}
printf("%d",*j);}
A. 5
B. 7
C. 10
D. 15
19. Which of the following is used to read a character from the keyboard rather than for a file
A. ch=fputc(std in)
B. ch=fget(std in)
C. ch= fput(std in)
D. ch= fgetc(std in)
20. The operators are called
A. Out direction
B. Redirection Operators
C. in direction
D. in out direction


B D C C B A A A A A
A C B D D B D C B B



1. An array is represented in Memorey by using a
A. Circular map
B. Sequential map
C. Parallel map
D. element map
2. In which of the following header files the standard file Pointers have been defined
A. std conio.h
B. std pointer.h
C. stdio.h
D. stdstream.h
3. Each field in a structure can be accessed and manipulated using
A. variables and members
B. variables and operands
C. operands and arguments
D. Expressions and operators
4. Which of the following function is used to remove the specified file from the disk
A. rewind( )
B. unlink( )
C. getw( )
D. fseek( )
5. #include
main( )
{
struct xx
{ int x=3; char name[ ]="hello";
};
struct xx *s=malloc(sizeof(strct xx));
printf("%d",s->x);
printf("%s"s->,name);
}
A. Compiler error
B. hello
C. xx
D. name
6. The function that is used to detect the end of file is
A. fgetch( )
B. fputs( )
C. ferror( )
D. feof( )
7. The general format of realloc function is
A. ptr=realloc(free)
B. ptr=realloc(ptr)
C. ptr=realloc(ptr,newsize)
D. ptr=realloc(size)
8. The internal Representation of bit field of bit field is
A. Human independent
B. Machine dependent
C. Machine Independent
D. Human dependent
9. Which of the following operations can be performed on the file "TEST.C" if it is successfully opened using the statment
FILE *fp;
fp=fopen("TEST.C","r+");
A. Writing
B. Reading
C. appending and ariting
D. Appending
10. Address x[I]= where I is of type int
A. Base address + ( I )
B. index address + (I+ scale factor of int)
C. Base address + (I + scale factor of int)
D. Index address + ( I )
11.How much Memory of the Compiler Reserves for each integer array element
A. 2 bytes
B. 8 bytes
C. 6 bytes
D. 4 bytes
12. The general form of array decleration is
A. Type array name[type]
B. Type variable name[ size]
C. Type data name[type]
D. Type data name[size]
13.Self referential structure means
A. Refers to any structure
B. Refers to the same structure
C. Refers to different structure
D. Refers to pointers
14. void main( )
{ int const * p=5;
printf("%d",++(*p));}
A. Compiler error
B. 10
C. 5
D. 15
15. #include
main( )
{ char s[ ]={ 'a','b','c','\n','c','\0'};
char *p, *str, *str1;
p=&s[3]; str=p;str1=s;
printf("%d",++*p+ ++*str1-32);}
A. b
B. M
C. a
D. compiler error
16. Which of the following is a string of charaters that make up a valid name for the operating system
A. extension name
B. period name
C. header name
D. file name
17. struct{ int I;
flaot j;} s; size(s) will be
A. 4bytes
B. 2bytes
C. 6bytes
D. 0bytes
18. main(int argc, char**argv)
{
printf("enter the character");
getcahr( );
sum(argv[1],arg[2]);
}
sum(num1,num2)
int num1,num2;
{
return num1+num2;
}
A. num1
B. num2
C. num1+num2
D. Compiler error
19. The process of calling a function using pointers to pass the address of variables is known as
A. call by parameter
B. call by refernece
C. call by value
D. call by argument
20. Which of the following operator is used to copy the contents of all structure elements of different fata types tp another variable of its type
A. =
B. *
C. &
D. ->

B C D B A D C B B C
A B B A B D C D B A


1. int b[5];
main( )
{ static int a[5];
int I;
for(I=0;I<4;I++)
printf("%d%d",b[I],a[I]);
}output is
A. 0000.5times
B. error
C. garbage values
D. 000.10times
2. The body of union should end with
A.colon( : )
B. semicolon( ; )
C. Period ( .)
D. comma ( ,)
3. If structure member is array, then an individual array element can be accessed by writting a variable
A. Structure(member)
B. member(Structure)
C.Member(expression)
D. member(datatype)
4.struct aaa{ struct aaa *prev;
int i;
struct aaa*next;};
main( )
{
struct aaa abc,defghi,jkl;
int x=100;
abc.i=0;abc.prev=&jkl;abc.next=&def;
def.i=1 ;def.prev=&abc;def.next=&ghi;
ghi.i=2 ;ghi.prev=&def ;ghi.next=&jkl;
jkl.i=3 ;jkl.prev=&ghi; jkkl.next=&abc;
x=abc.next->next prev->next-> i;
printf("%d",x);}'
A. 3
B. 2
C. 4
D. compiler error
5. The amount of storage required for holding the elements of array depends on
A. size
B. Memory
C. Type and size
D. Type
6. Which of the following function is used for storing information in a disk file
A. Scanf( )
B. fscanf( )
C. printf( )
D. fprintf( )
7. The indirection( * )operator is also called as
A. deference operator
B. Star operator
C. Inference operator
D. bit wise operator
8. Struct {int I; float J;) *s; if the address stores in S is 2000, what is the value of s+3?
A. 2009
B. 2000
C. 2006
D. 2012
9. func(a,b)
inta, b;
{ return(a=(a= = b));
}
main( )
{
int process( ), func( );
printf("The value of process is %d ! \n", process(func,3,6));
}process(pf,val1,val2)
int(*pf) ( );int val1,val2;
{
return((*pf)(val1,val2));
}
The value of process is
A. Compiler eror
B. 3!
C. 1!
D. 0!
10. The EOF is equivalent to
A. 2
B. 1
C. -1
D. 0
11.Which of the following operators are called redirection operators
A. <- - ->
B. 1
C. -1
D. 0
12. We can pass parameters to a program at command line using
A. Actual arguments
B. Command line arguments
C. Parameter aruments
D. Command parameter arguments
13. The general format of fprintf( ) function is
A. fprintf(fp,list)
B. fprintf(control string, list)
C. fprintf(fp,controlstring,list)
D. fprintf(fp,"controlstring")
14. Which is not true among the following
A. A function can be called from another function
B. Brazil( ) is a user defined function
C. A function can be defined in another function
D. Printf( ) is a Library function
15. The C library that contains the Prototype statement for the file operation is
A. proto.h
B. file.h
C. stdio.h
D. stdlib.h
16. #include
main( )
{
struct xx
{
int x;
struct yy
{ char s; struct xx *p;
};
struct yy *q;
};
}
A. Compiler Error
B. yy
C. xx
D. m xy
17. A type defined Structure starts with the keyword
A. Case
B. Void
C. Typedef
D. Struct
18. The general format of free function is
A. free(newsize)
B. free(size)
C. free(ptr)
D. free(ptr,size)
19. main( )
{int arr[ ]={'A','B','C','D'};
int I;
for(I=0;I<3;I++)
printf("%d",arr[I]);
}
A. 65 66 67 68
B. A B C D
C. A B C
D. 65 66 67
20. The arguments of calling functions are called
A. Formal arguments
B. Function call
C. Actual arguments
D. Parameter arguments


D B C B C D A A D C
B B C C B A C C D C


1. puts(argv[0])prints
A. argv
B. the number of command line arguments
C. the name of executable code file
D. the name of the source code file
2. Struct a{ int I;
float j;
} s; size of (s) will be
A. 8 bytes
B. 6bytes
C. 0 bytes
D. 2 bytes
3. enum colors { BLACK,BLUE,GREEN}
main( )
{
printf("%d..%d.. %d",BLACK,BLUE,GREEN);
return(1);}
A. 0,1
B. black
C. Compiler error
D. 0,1,2
4. The valid range of subscript in an array is
A. size
B. 1 to Size-1
C. 0 to size-1
D. 0 to Size
5. Portion of memory to be shared by different tpes of data is
A. union
B. struct
C. field
D. array
6. Which of the following function is used to set the record pointer at the beginning of the file
A. putc( )
B. getw( )
C. rewind( )
D. gets( )
7. Which of the following operator is used to open the contents of all structure elements of different data types to another structure variable of its type
A. ->
B. &
C. =
D. *
8. main( )
{ int *j;
{ int i=10; j=&i;
}printf("%d",*j);
}
A. 5
B. 10
C. 20
D. 15
9. The process of calling a function using pointers tp pass the addresses of variables is known as
A. call by value
B. call by parameter
C. call by reference
D. call by argument
10. Which of the following is used with printf( ) funxction for printing the address of a variable
A. %f
B. %c
C. %u
D. %d
11.Which of the following operations can be performed on the "TEST.C" if it is successfully opened using the statement
FILE *fp
fp=fopen("TEST.c","r+");
A. writing
B. Appending
C. Reading
D. appending and writing
12. Which is not true among the following
A. Pointers reduces the lenth and complexity of a program
B. Pointers are more efficient than arrays
C. Pointers are more efficient in handling the data tables
D. Pointers decrese the Execution speed
13. A character array always ends with
A. Full stop
B. NULL character
C. &
D. ?
14. The general format of free function is
A. free(ptr)
B. free(ptr,size)
C. free(size)
D. free(new size)
15. Which of the following function is used for storing information in a disk file
A. printf( )
B. scanf( )
C. fprintf( )
D. fscanf( )
16. Which of the following operators are called redirection operators
A. ?, *
B. < , >
C. ->,<-
D. <- - ->
17. A function gets called when the function name is followed by
A. comma( ,)
B. Period ( .)
C. Colon( :)
D. Semi colon(;)
18. The internal Representation of bit field is
A. Human independent
B. Machine dependent
C. Human dependent
D. Machine independent
19.Which of the following function are used to detect I/o errors in the files
A. feof& ferror
B. f i/0 & fof
C. eof & error
D. fofe & f i/o
20. The pointer accessing method is _________ than Array indexing
A. same efficient
B. slower
C. faster
D. less efficient



C B D C A C C B C C
C D B A C B D B A C




1.main( )
{int *j;
{ int i=10; j=&i;}
}
A. 7
B. 10
C. 5
D. compiler error
2. The general format of realloc function is
A. ptr=realloc(size)
B. ptr=realloc(ptr)
C. ptr= realloc(ptr,newsize)
D. ptr= realloc(free)
3. Which of the following standard file pointer is used for standard auxiliary device
A. std prn
B. std aux
C. std io
D. std conio
4. Array elements can be accessed using
A. pointer
B. Tree
C. stack
D. queue
5. Address x[ I ]=where I is of type int
A. Base address + ( I )
B. Base address + (I+ scale factor of int)
C. Index address + ( I + scale factor of int)
D. Index address + ( I )
6. The general formate of sending a copying of entire structure to the function is
A. Structure name(function variable name)
B. Function name (structure variable name)
C. structure name(function )
D. function name(structure)
7. The operators are called
A. in direction
B. in out direction
C. out direction
D. redirection operators
8. The body of the stucture should end with
A. semicolon( ; )
B. comma( , )
C. colon (:)
D. period(.)
9. Which is a self contained block of code that performs a particular task
A.Stack
B. Array
C. Pointer
D. Function
10. Example of a self-referential Structure
A. Elements in a stack
B. Nodes in a Tree
C. Elements in a quene
D. Nodes in a Linked list
11. Which of the following unary operator is used to specify the size of the structure
A. Length( )
B. unary( )
C. sizeof( )
D. struct( )
12. In a program a function can be called
A. one time
B. two times
C. three times
D. any no.of times
13. In arrays of structures the members are referred using
A. *
B. ->
C. &&
D. ( . )
14. Which of the following sets the file postion marker to the starting of the file
A. fseek(ptr)
B. fseek(ptr,seek_cur);
C.fseek(ptr,0,SEEK_SET);
D. fseek(ptr,0,SEEK_CUR);
15. main( )
{int a=5,b,*c;c=&a;b=*c;
printf("\n value of a=%d & b=%d",a,b,)}
A. a=3,b=3
B. a=4,b=4
C. a=6,d=6
D. a=5,d=5
16.The general format of fprintf( ) function is
A. fprintf(fp,list)
B. fprintf(control string,list)
C. fprintf(fp,controlstring,list)
D. fprintf(fp, "controlstring")
17. enum colors{BLACK,BLUE,GREEN}
main( )
{ printf("%d..%d..%d",BLACK,BLUE,GREEN);
return(1);}
A. 0,1,2
B. compiler error
C. 0,1
D. black
18 func(a,b)
int a,b;
{return(a=(a= =b));
}
main( )
{
int process( ),func( );
printf("The value of process is %d! \n", process(func,3,6));
} process(pf,val!,val2)
int (*pf) ( ); int val1,val2;
{
return((*pf)(val1,val2));
}
the value of process is
A. 3!
B. compiler error
C.0!
D. 1!
19. Which of the following function is used for storing information in a disk file
A. fprintf( )
B. fscanf( )
C. scanf( )
D. printf( )
20. The general format of feof function is
A. feof(fp,"controlstring");
B. feof("control string",list);
C. feof(fp,list);


D C B A B B D A D D
C D D C D C A C A D


1.Which of the following is a string of characters that make up a vanu name for operating system
A. header name
B. period name
C. file name
D. extension name
2. Structure elements can be accessed through a pointer to a structure using the operator
A. *
B. ->
C. ( , )
D. &
3. Pointer to pointer is also called as
A. Pointer function
B. Pointer structure
C. Pointer direction
D. pointer indirection
4. main( )
{ char *p; p="HELLO";
printf("%c \n ",*&*p);
}
A. HE
B. HELLO
C. HELL
D. H
5. Which of the following standard file pointer is used for atandard Auxiliary device
A. std conio
B. std aux
C. std prn
D. std io
6."r+" is used to open a file in
A. read and write mode
B. append mode
C. write mode
D. read mode
7. How much Memory the compiler Resrves for each integer array element
A. 4bytes
B. 6bytes
C. 2 bytes
D. 8 bytes
8. main( )
{ char *str1="abcd";
char str2[ ]="abcd";
printf("%d%d%d",sizeof(str1),sizeof(str2),sizeof("abcd"));}
A. 2 5 5
B. 5 5 2
C. compiler error
D. 5 2 5
9. The general format f fprintf( ) function is
A. fprintf(fp,"controlstring")
B. fprintf(fp, controlstring,list)
C.fprintf(fp,list)
D. fprintf(control string,list)
10. struct a {int I;
float j;
}s; sizeof(s) will be
A. 8 bytes
B. 6bytes
C. 2bytes
D. 0bytes
11.Which is not true among the following
A. Brazil( ) is a user defined function
B. A function can be defined in another function
C. Printf( ) is a library function
D. A function can be called from another function
12.Which of the following keyword is used to specify an identifier for an existing datatype
A. union
B. type def
C.struct
D. case
13.Function donot require
A. Global parameters
B. Local parameters
C. Actual parameters
D.formal parameters
14. The function that reads the next charecter from the standard input stream and return its value is
A.Getc
B.Fgetc
C.Readchar
D.Getchar
15.#include
main( )
{
struct xx
{ int x=3; char name[]="hello";};
struct xx *s; printf("%d",s->x);printf("%s",s->name);}
A. he
B. hello
C.compiler error
D.hell
16. When we pass address to a function, the parameters recieving the address should be
A. Pointers
B. Union
C.Functions
D. Structures
17.Which true among the following
A. argh
A. argf
C. argv
D. argc
18. Which is true among the following
A. Pointers increase the exection speed
B. Pointers are not more efficient in handling the data tables
C. Pointers are not efficient than arrays
D. Pointers increase the length and complexity of the program
19. The general format of calloc is
A. ptr=(cast type *)calloc(byte size)
B. ptr=calloc(cast type*)bytesize
C. ptr=(cast type*)
D. ptr=(cast type*)calloc(n,elementsize)
20. Atype defined structure starts with the keyword
A. Struct
B.Case
C. Typedef
D.struct



C B D D B A C A B B
B B D D C A A D D C

WWW.DEXTEROUS.110MB.COM

SET 9
1.Which is not true among the following
A. Brazil( ) is a user defined function
B. A function can be defined in another function
C. Printf( ) is a library function
D. A function can be called from another function
2.How much memory the compiler reserves for each integer array element
A. 6bytes
B.8bytes
C.4bytes
D2bytes
3.Which of the following function is used to close all the files and returns number of files closed
A. fclose(fp)
B. close( )
C.fcloseall( )
D. closeall( )
4.the EOF is equivalent to
A. 0
B. 2
C. -1
D. 1
5. main( )
{ static int a[ ]={ 10,20,30,40,50};
int j;for(j=0;j<5;j++)
{printf(%d,a[j]);
a++;
}
} output is
A. 10 20 30 40
B. 10 20 30
C. 10 20
D.compilier error
6. Which of the following is not true
A. pointers can be used for addressing the bit field directly
B. bit field provides exact amount of bits reserved for storage value
C. Unions can apper in arrays and structures
D. Unions are used to conserve memory
7. Which of the following is a string of characters that make up a valid name for the operating system
A. header name
B. period name
C. file name
D. extension name
8. If Structure member is array, then an individual array element can be accessed by writing a variable
A.structure( member)
B. member (expression)
C. member(structure)
D.member(datatype)
9. Which of the following sets the file position marker to the current position of the file
A. fseek(ptr,0,SEEK_CUR);
B. fseek(ptr,0,SEEK_SET);
C. fseek(ptr,0,seek_cur);
D. fseek(ptr)
10. #include
main()
{
struct xx
{
int x;
struct yy
{char s; struct xx*p;
};
}
A. m xy
B. xx
C. Compiler Error
D. yy
11. Which of the following standard file pointer is used for standard Auxilary device
A. std prn
B. std conio
C. std aux
D. std io
12. The first parameter in he command line is always
A. struct name
B. Pointer name
C. program name
D. function name
13. A character array always ends with
A. ?
B. Full stop
C. NULL character
D. &
14. main( )
{ int a=5,b,*c;c=&a;b=*c;
printf("\n value of a=%d & b=%d",a,b);}
A. a=6,d=6
B. a=4,b=4
C. a=5,d=5
D. a=3,b=3
15. Self referential Structure means
A. Refers to pointers
B. Refers to the same structure
C. Refers to the different structure
D. Refers to any structure
16. #include
main( )
{struct xx
{ int x=3;char name[ ]="hello";};
struct xx *s; printf("%d",s->name);}
A. Compiler error
B. he
C. hell
D. hello
17. main( )
{
char *p; p="%d \n";
p++;
p++;
printf(p-2,300);
}
A. 296
B. 300
C. 298
D. compiler error
18 main()
{ int arr[ ]={'A','B','C','D'}
A 65 66 67 68
B. A B C D
C. A B C
D. 65 66 67
19. The general format of realloc function is
A ptr=realloc(free)
B. ptr=realloc(size)
C. ptr=realloc(ptr,newsize)
D. ptr= realloc(ptr)
20. The type def Statement is used for
A. Declaring user defined data types
B. declaring variant variables
C. for assigning values to variables
D. for type casting of variables



B D C C D A C B A C
Gandhiji Institute Of Science & Technology Jaggiahpet-521175
Department of Computer Science(Online Bits)
INSTRUCTOR by Banoth Samya M.Tech



1. Struct a{
int I;
float j;
}; Which of the following syntax is correct to declare a structure variable
A. struct union a;
B. union struct a;
C. union a t;
D. Struct a t;
2. Which of the following are Parameters supplied to a program when te program is invoked
A. Command line argument
B. parameter argument
C. reference argument
D. Actual argumen
3. main()
{char s[6]="HELLO"
printf("%d",s[6]);
}
output is
A. compiler error
B. 0
C. 34
D. 45
4. Which of the following sign is used to access the structure members
A. &&
B. *
C. ( . )
D. ->
5. main()
{ int *j;
{ int i=10;j=&i;
}printf("%d",*j);
}
A. 10
B. 20
C. 15
D. 5
6. Which of the following operator is used by the pointer to access the member of a structure
A. ( . )
B. ->
C. *
D. &&
7. Structure elements can be accessed through a pointer to a sructure Using the operator
A. ( , )
B. &
C. *
D. ->
8. Which of the following mode opens a binary file in write mode
A. feof( )
B. putw( )
C. getw( )
D. wb (write)
9. Array elements can be accessed using
A. Tree
B. Pointer
C. stack
D. Queue
10. Which of the following is a set of records that can be accessed through the set of Library Functions
A. File
B. Algorithm
C. program
D. Data
11. The general format of realloc function is
A. ptr=realloc(ptr,newsize)
B. ptr=realloc(ptr)
C. ptr=realloc(size)
D. ptr=realloc(free)
12. struct{ int I;
float j; } s; size(s) will be
A. 6 bytes
B. 0 bytes
C. 2 bytes
D. 4 bytes
13. The EOF is Equivalent to
A. 1
B. 2
C. 0
D. -1
14. main( ) { int arr[ ]={'A', 'B', 'C', 'D'}
int I; for( I=0; I<3; I++)
printf("%d",arr[I]);

No comments: