edited by
581 views
0 votes
0 votes

According to me Option D.

Because it should be an error because *("INDIA" + 2 ) = 'D' and we are doing 'D' = 'I' which is not valid so Error ???

But answer is C

edited by

1 Answer

Best answer
3 votes
3 votes

Attempting to write on Read-only location is a segmentation fault but not the error...

 

segmentation fault means Abnormal termination of Program.

 

read more on Segmentation fault https://en.wikipedia.org/wiki/Segmentation_fault

selected by

Related questions

0 votes
0 votes
3 answers
1
Subham Nagar asked Mar 20, 2018
1,185 views
An array $'A'$ has $n$ distinct integers. What is the tightest time complexity to check $A[i]=i$ for some $i$. Consider all elements of array within range from $1$ to $n$...
3 votes
3 votes
0 answers
2
Asim Abbas asked Jan 11, 2018
439 views
Answer of this question is given as (C), but I am not able to get it how. Can any1 please explain this?
1 votes
1 votes
0 answers
3
0 votes
0 votes
2 answers
4
Mr_22B asked Dec 10, 2017
2,289 views
What is the time complexity to insert a new Node in a singly circular linked list at Starting ? (Number of nodes in list = N)A. O(1)B. O(N)