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 p in text message?
what is event driven software and what is procedural driven software?
What is volatile variable in c with example?
What is a newline escape sequence?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
Why dont c comments nest?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is the use of static variable in c?
What is the role of && operator in a program code?
Explain how can I right-justify a string?
What does %p mean c?
Explain union.
State two uses of pointers in C?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
diff between exptected result and requirement?