Question: 1)int *ptr; int val = 1; ptr = val; The second statement in the above code will assign the value 1 to the pointer. True/False

1)int *ptr; int val = 1; ptr = val; The second statement in the above code will assign the value 1 to the pointer. True/False

2)char chrVal[ ] = Good Morning;

The above statement will result a compilation error True/False

3)

const int maxVal=50;

Value of maxVal can not be changed elsewhere in the program True/False

4)

int a[5]; int *ptr;

ptr = a;

a. the second statement will assign the address of the first element in the array

b. the statements will cause a compilation time error

c. the statements will cause the program to stop running

d. none of the above

5)

char val[50] = Hello

a. will result a run/execution time error

b. will result a compilation time error

c. will not result any error

d. none

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!