713 views
4 votes
4 votes

Loading Question

1 Answer

3 votes
3 votes

Credits to @mcjoshi

Answer is option (C) : Angel

String Angel is stored like A,n,g,e,l,\0 . str[5] = '\0';

str[10] = 'd'; // some address (str+10) is assigned value 'd'.

Printf() in the next line prints the string from memory location str till it encounters null character. i.e., Angel

Related questions

0 votes
0 votes
1 answer
1
Debargha Mitra Roy asked 2 days ago
39 views
#include <stdio.h int main() { int a[3] = {1, 3, 5, 7, 9, 11}; int *ptr = a[0]; ptr += sizeof(int); printf("%d", *ptr); return 0; }(Assume size of int to be $2$ bytes.)T...
2 votes
2 votes
1 answer
2