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
What is context in c?
What are the string functions? List some string functions available in c.
What is meant by errors and debugging?
what will be maximum number of comparisons when number of elements are given?
What is %d used for?
What is a ternary operator in c?
How many types of sorting are there in c?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
What’s the special use of UNIONS?
Differentiate between #include<...> and #include '...'
What is the function of this pointer?
What does #pragma once mean?
When should structures be passed by values or by references?
What is the difference between if else and switchstatement
Can you apply link and association interchangeably?