Question: Based on the following declarations, tell whether each statement below is syntactically legal (yes) or illegal (no). int* p; int* q; int* r; int a;

Based on the following declarations, tell whether each statement below is syntactically legal (yes) or illegal (no). int* p; int*

q; int* r; int a; int b; int c;

int* p; int* q: int* r; int a; int b; int c;

a. p = new int; b. q* = new int; C. a=

int* p; int* q: int* r; int a; int b; int c; a. p = new int; b. q* = new int; C. a= new int; d. e. p = r; q = b; Yes /no f. g. h. r = C = *p; p = *a; NULL; delete b; i. j. q = &c; Yes /no

Step by Step Solution

3.45 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Problem The question presents a series of variable declarations and statements involving pointers integer variables and character arrays in C The task is to determine whether each statement is syntact... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Language Pragmatics Questions!