C Programming

General Questions

C Programming Exercise Mode

General Questions

Practice and master this topic with our carefully crafted questions.

2 Questions
3 Minutes
0% Completed
QUEST ? !
Question 11

Comment on the following?

const int *ptr;


A
You cannot change the value pointed by ptr
B
You cannot change the pointer ptr itself
C
Both (A) and (B)
D
You can change the pointer as well as the value pointed by it
Correct Answer: Option A

You cannot change the value pointed by ptr

Question 12
Which of the following does not initialize ptr to null (assuming variable declaration of a as int a=0;?

A
int *ptr = &a;
B
int *ptr = &a – &a;
C
int *ptr = a – a;
D
All of the mentioned
Correct Answer: Option A

No answer description available for this question.

Previous 1 2
Page 2 of 2