- Home
- Placement
- Programming
- Array
- Array
- Data Types
- Functions
- Loop & Control Statements
- Operators & Expressions
- Pointer
- Preprocessor
- Storage Classes
- Structure & Union
- Variables & Constants
- Classes and Objects
- Consructors and Destructors
- Exception handling
- File Handling
- Function Overloading
- Inheritance
- Operator Overloading
- Polymorphism
- Templates
C Language
C++ language
JAVA
-
-
( 1 ) Below is an example of -
int RollNum[30][4]; - 1) 1-D Array
- 2) 2-D Array
- 3) 3-D Array
- 4) 4-D Array
-
Show Answer Report Discussion in forumAnswer : 2) 2-D Array
Solution :
discussion
Answer : 2) 2-D Array
-
-
-
( 2 ) The elements in the array of the following code are
int array[5] = {5}; - 1) 5, 5, 5, 5, 5
- 2) 5, 0, 0, 0, 0
- 3) 5, (garbage), (garbage), (garbage), (garbage)
- 4) (garbage), (garbage), (garbage), (garbage), 5
-
Show Answer Report Discussion in forumAnswer : 2) 5, 0, 0, 0, 0
Solution :
discussion
Answer : 2) 5, 0, 0, 0, 0
-
-
-
( 3 ) Comment on an array of void data type:
- 1) It can store any data-type
- 2) It only stores element of similar data type to first element
- 3) It acquires the data type with the highest precision in it
- 4) You cannot have an array of void data type
-
Show Answer Report Discussion in forumAnswer : 4) You cannot have an array of void data type
Solution :
discussion
Answer : 4) You cannot have an array of void data type
-
-
-
( 4 ) What will be the output of the program ?
#include
int main()
{
int arr[1] = {10};
printf("%d", 0[arr]);
return 0;
} - 1) 1
- 2) 0
- 3) 10
- 4) 6
-
-
-
( 5 ) Which of the following correctly declares an array?
- 1) int anarray[10];
- 2) int anarray;
- 3) anarray{10};
- 4) array anarray[10];
-
Show Answer Report Discussion in forumAnswer : 1) int anarray[10];
Solution :
discussion
Answer : 1) int anarray[10];
-
-
-
( 6 ) int a[5] = {1,2,3}
What is the value of a[4]? - 1) 3
- 2) 1
- 3) 2
- 4) 0
-
-
-
( 7 ) Which of the following is correct way to define the function fun() in the below program?
#include
void main()
{
int a[3][4];
fun(a);
} - 1) void fun(int p[][4]){}
- 2) void fun(int *p[4]){}
- 3) void fun(int *p[][4]){}
- 4) void fun(int *p[3][4]){}
-
Show Answer Report Discussion in forumAnswer : 1) void fun(int p[][4]){}
Solution :
discussion
Answer : 1) void fun(int p[][4]){}
-
-
-
( 8 ) Advantage of a multi-dimension array over pointer array.
- 1) Pre-defined size
- 2) Input can be taken from user.
- 3) Faster Access.
- 4) All of the above
-
Show Answer Report Discussion in forumAnswer : 4) All of the above
Solution :
discussion
Answer : 4) All of the above
-
-
-
( 9 ) What will be output if you will execute following c code?
#include
void main()
{
int const SIZE=5;
int expr;
double value[SIZE]={2.0,4.0,6.0,8.0,10.0};
expr=1|2|3|4;
printf("%f",value[expr]);
} - 1) 2.000000
- 2) 4.000000
- 3) 6.000000
- 4) Compilation error
-
Show Answer Report Discussion in forumAnswer : 4) Compilation error
Solution :
discussion
Answer : 4) Compilation error
-
-
-
( 10 ) What will be output if you will execute following c code?
#include
#define var 3
void main()
{
char *cricket[var+~0]={"clarke","kallis"};
char *ptr=cricket[1+~0];
printf("%c",*++ptr);
} - 1) k
- 2) a
- 3) l
- 4) i
-