1 1 vote Programming in C programming-in-c + – Sourabh Kumar 880 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
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. sh!va answered Jul 25, 2016 sh!va comment Share Follow See all 2 Comments 2 2 Comments reply cse23 commented Jul 25, 2016 reply Follow flag if base address og a is 100(let) then *p = a+3 =100 + 3 = 106 (as integer is 2 bytes generally) 4 is modified to 99 now, a[2] = a+2*2 =100+4 =5 similarly,a[3]=99 and a[4]=2 0 0 replyShare Vishal Goyal commented Sep 4, 2016 reply Follow flag Here the a is declared as constant and we are modifying it by using a pointer is it valid I mean will it show any error 0 0 replyShare Please log in or register to add a comment.
0 0 votes This code will show error because we cannot change the value of const int either directly or by any pointer RiteshSingh answered Apr 16, 2017 RiteshSingh comment Share Follow 0 reply Please log in or register to add a comment.