Bissoy
Login
Get Advice on Live Video Call
Earn $ Cash $ with
consultations on Bissoy App
Which of the following is the correct syntax to declare a 3 dimensional array using pointers?
A
char *a;
B
char **a;
C
char ***a;
D
all of the mentioned
Correct Answer:
char *a;
A material is loaded elastically under plane stress condition given by the following tensor:
\[\left[ {\begin{array}{*{20}{c}} 1 \\ 0 \end{array}\begin{array}{*{20}{c}} 2 \\ 1 \end{array}\begin{array}{*{20}{c}} 0 \\ 0 \end{array}} \right
A
\
B
<br>The modulus of rigidity is 25 MPa. The maximum elastic engineering strain is
C
<p><span>A.</span> 0.48
D
</span> 0.4
Which of the following is a two-dimensional array? b) int array c) int array d) char array
A
array array
B
20
C
20
D
20
Which among the following is correct syntax to declare a 2D array using new operator? = new char; b) char (pchar) = new char; c) char (*char) = new char; d) char (*char)= new char;
A
char (*pchar) = new char;
B
10
C
10
D
10
Directions :
In each of the following questions a statement is given, followed by two conclusions. Give answer :
Statements :
The Government run company had asked its employees to declare their income and assets but it has been strongly resisted by employees union and no employee is going to declare his income.
Conclusions :
I. The employees of this company do not seem to have any additional undisclosed income besides their salary.
II. The employees union wants all senior officers to declare their income first.
A
Only conclusion I follows
B
Only conclusion II follows
C
Either I or II follows
D
Neither I nor II follows
E
Both I and II follow
What is the correct syntax of declaring array of pointers of integers of size 10 in C++? ; b) int **arr = new int*; c) int *arr = new int; d) int *arr = new int*;
A
int arr = new int;
B
10
C
10
D
10
Read the statement and select a conclusion from the given alternatives. Statement : Company 'X' had asked its employees to declare income and assets but it has strongly opposed by the employees' his/her union and no employee is going to declare his/her income. Conclusions : I. The employees of the company 'X' do not seem to have any additional income besides their salary. II. The employees' union want all the senior officer to declare their income first.
A
Only conclusion I follows
B
Only conclusion II follows
C
Either I or II follows
D
Neither I nor II follows
In C, how do you declare an array of pointers to integers?
A
int* arr;
B
arr int*;
C
int arr*;
D
int* arr;
Given a one-dimensional array of integers, you have to find a sub-array with maximum sum. This is the maximum sub-array sum problem. Which of these methods can be used to solve the problem?
A
Dynamic programming
B
Two for loops (naive method)
Suppose we have a one dimensional array, named ‘x’, which contains 10 integers. Which of the following is the correct way to allocate memory dynamically to the array ‘x’ using malloc()?
A
x=(int*)malloc(10);
B
x=(int*)malloc(10,sizeof(int));
C
x=malloc(int 10,sizeof(int));
D
x=(int*)malloc(10*sizeof(int));
Suppose we have a one dimensional array, named 'x', which contains 10 integers. Which of the following is the correct way to allocate memory dynamically to the array 'x' using malloc()?
A
x=(int*)malloc(10);
B
x=(int*)malloc(10,sizeof(int));
C
x=malloc(int 10,sizeof(int));
D
x=(int*)malloc(10*sizeof(int));