adplus-dvertising
frame-decoration

Question

Which of the following is illegal?

a.

int *ip;

b.

string s, *sp = 0;

c.

int i; double* dp = &i;

d.

int *pi = 0;

Answer: (c).int i; double* dp = &i;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is illegal?

Similar Questions

Discover Related MCQs

Q. The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is

Q. Which of the following correctly declares an array?

Q. What is the index number of the last element of an array with 9 elements?

Q. What is a array?

Q. Which of the following accesses the seventh element stored in array?

Q. Which of the following gives the memory address of the first element in array?

Q. What is meaning of following declaration?
int(*p[5])();

Q. What is size of generic pointer in C++ (in 32-bit platform) ?

Q. The constants are also called as

Q. What are the parts of the literal constants?

Q. How the constants are declared?

Q. Which of the following statement is not true about preprocessor directives?

Q. Regarding following statement which of the statements is true?
const int a = 100;

Q. The difference between x and ‘x’ is

Q. How to declare a wide character in string literal?

Q. Which value we cannot assign to reference?

Q. Identify the incorrect statement.

Q. Which reference modifier is used to define reference variable?

Q. What does a reference provide?

Q. Identify the correct sentence regarding inequality between reference and pointer.