NEW
Font size
WorksheetsProgramming skill
Total questions: 26
Worksheet time: 14mins
1. What is the dimension of the below C array?
int a[3][3][2]
2
3
5
none of the above
During the initialization of 2D array if the values are missing they are automatically set to
0
NULL
1
None of the above
Which of the following is correct method of initialization?
int arr[2][3] = {{0,0,0},(1,1,1}};
int arr[2][] = {{0,0,0},(1,1,1}};
int arr[2][3] = {{0,0,0,0,0},(1,1,1}};
int arr[2][3] = {};
If the values in the two dimensional arrays as follows: int a[3][3]={10,20,30,40,50,60,70,80,90};
what will be the index of 60?
2,1
2,0
1,2
0,1
During initialization of two-dimensional array an error occurs if the array size of is not written.
First/Row
Second/Column
both option 1 & 2
option 1 or 2
While counting the string length is the terminating null character counted?
yes
no
The parameters which are in the function header is called
Actual
Formal
Global
Local
Which is the correct syntax for writing function header?
int mul(int a, int b)
int mul(int a, int b);
int mul(int , int)
int mul(int a, b);
When a function is called
Formal parameter is copied into actual parameter
Actual parameter is copied into formal parameter
Both the above two options are possible
Global is copied to formal parameter
When the return is encountered the control is passed
Only to the main function
To the called function
To the calling function
Control remains in the same function
If the return type of the function is not specified the default will be
Char
Void
Float
Int
In what condition we can exclude the return statement in function?
When function has return type void
When the return type is not specified
When function has return type int
None of the above
When we place function prototype above all the functions is called as
Local Prototype
Global Prototype
Static prototype
None of the above
When we place function prototype inside the function definition is called as
Local prototype
Global prototype
Static prototype
None of the above
Actual parameters are written into
Function header
Function defination
Function call
Function declaration
Function that is called by itself is called
Super function
Recursive function
Main function
All of them
10
5
15
Compile time error
Which operator is connecting the structure variable to structure member?
Dot operator
Member operator
Period operator
All of the above
Which operator is connecting the structure variable to structure member?
.
->
:
@
What will be the correct for union?
All the members can be initialized in union
All the members share same location in memory
All the members have its own storage
All the members of union can be access any time
2
20
4
26
Size of the union is determined by size of the
First member in the union
Last member in the union
Biggest member in the union
Sum of the size of all member
0
Garbage value
Compile time error
25
2
5
8
15
struct book b1= {“BASIC”,”BALAGURUSAMI”,300,240.67};
struct book b1= {“BASIC”,”BALAGURUSAMI”,300,240};
struct book b1= {“BASIC”,”BALAGURUSAMI”};
struct book b1= {“BASIC”,300,240.67};
Which is the correct syntax to use typedef for structure?
All of the above
