study the code:
#include<stdio.h>
void main()
{
const int a=100;
int *p;
p=&a;
(*p)++;
printf("a=%dn(*p)=%dn",a,*p);
}
What is printed?
A)100,101 B)100,100 C)101,101 D)None of the
above

Answer Posted / santhoo035

d)None of the above
It will give compliation error at the line p=&a,pointer to
integer cannot assign to const int

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is uint8 in c?

647


How do you print only part of a string?

618


How can I split up a string into whitespace-separated fields?

573


Explain how do I determine whether a character is numeric, alphabetic, and so on?

656


Describe the order of precedence with regards to operators in C.

635






Is it fine to write void main () or main () in c?

549


Is c high or low level?

588


What is nested structure with example?

629


Write a program to swap two numbers without using third variable in c?

620


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

628


What is abstract data structure in c?

533


Explain how can I convert a number to a string?

652


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

1016


What is NULL pointer?

680


Explain void pointer?

594