in Others edited by
177 views
0 votes
0 votes

Which of the following are legal statements in $C$ programming language?

  1. int *P=&44;
    
  2. int *P=&r;
    
  3. int P=&a;
    
  4. int P=a;
    

Choose the correct option:

  1. (a) and (b)
  2. (b) and (c)
  3. (b) and (d)
  4. (a) and (d)
in Others edited by
177 views

1 Answer

0 votes
0 votes

(B) and (D) are legal statements.

int *P=&44; → assigns address of constant to variable.
int P=&a; → assigns address of variable to variable of type int.

Related questions