880 views

2 Answers

1 1 vote

Output will be 5,99,2

But if the a[3]= 78 was not commented, compiler would have thrown error as you are modifying const variable.

0 0 votes
This code will show error because we cannot change the value of const int either directly or by any pointer
Position:
Show:

Related questions

–2 –2 votes
0 0 answers
420
420 views
Barbarian King asked Jan 27, 2017
420 views
Please tell some free resources to learn ethical hacking ?
6 6 votes
3 3 answers
282
282 views
GO Classes asked Jun 16
282 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int step = 1; if (n <= 1) return n; step++; return n + fun(n - step); } int main() { pr...
8 8 votes
3 3 answers
330
330 views
GO Classes asked Jun 15
330 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int x = 0; int y; if (n == 0) return 0; x++; y = fun(n - 1); return y + x; } int main()...
7 7 votes
2 2 answers
278
278 views
GO Classes asked Jun 13
278 views
What is the output of the following code?#include <stdio.h int fun(int n) { static int count = 0; if (n == 0) return count; count = count + n; return fun(n - 1); } int ma...