1 votes 1 votes Programming in C programming-in-c + – Sourabh Kumar asked Jul 25, 2016 Sourabh Kumar 450 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes 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 See all 2 2 Comments reply cse23 commented Jul 25, 2016 reply Follow Share 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 votes 0 votes Vishal Goyal commented Sep 4, 2016 reply Follow Share 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 votes 0 votes Please log in or register to add a comment.
0 votes 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 See all 0 reply Please log in or register to add a comment.