void main()
{
//char ch;
unsigned char ch;
clrscr();
for(ch =0;ch<= 127; ch++)
printf(" %c= %d \t ", ch, ch);
}
output?
Answer Posted / sorab aggarwal
It will print all the characters including(special characters,a to z,A to Z characters)from 0 to 127 range becoz "Ch"variable in unsigned nature so it only deals with positive range not negative ..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is data structure in c language?
Is c dynamically typed?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
Explain the properties of union. What is the size of a union variable
What is union and structure?
Why main is not a keyword in c?
Should a function contain a return statement if it does not return a value?
What is assignment operator?
Did c have any year 2000 problems?
Is c easy to learn?
What do you understand by normalization of pointers?
What are the various types of control structures in programming?
What is difference between main and void main?
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier. Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed. When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed. Sequence of take-off is the sequence of addition to the waitlist
Explain what is wrong with this program statement?