411 views

2 Answers

1 votes
1 votes
Compilation error at two places

1)  int const * i= 5;....this is an invalid conversion..means that's not correct way to convert int into const

you can convert it by typecasting(for eg; int const *i=(const *)5;)
2)printf("%d\n", ++(*i)); due to increment operation

Related questions

1 votes
1 votes
1 answer
1
srestha asked Jul 27, 2017
401 views
Analyze what is happening and why?int *ptr=(int*)0X12341230; int *ptr2=((int*)(((char*)ptr)+1));char *ptr=(char*) 0X12341230; void *ptr2=ptr+1;
1 votes
1 votes
1 answer
4