Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

1) int main() {
unsigned char a = 0;
do {
printf("%d=%c\n",a,a);
a++;
}while(a!=0);
return 0;
}
can anyone please explain the explain the output

Answer Posted / c.p.senthil

ANS: Prints all the ascii characters from 0 to 255 in the below format
0=
1=&#9786;
2=&#9787;
3=&#9829;
4=&#9830;
5=&#9827;
6=&#9824;
.
.
.
251=&#8730;
252=&#8319;
253=²
254=&#9632;
255= 

'a' is a unsigned char variable, size = 8 bits
so the maximum value 'a' can store is 255.
an increment from 'a' value 255 will cause overflow and
'a' value becomes 0, when the loop terminates.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static and volatile in c?

1234


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

2133


Wt are the Buses in C Language

3228


What does int main () mean?

1038


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2757


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2878


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1136


Is there a built-in function in C that can be used for sorting data?

1282


What are variables and it what way is it different from constants?

1252


Explain how can you be sure that a program follows the ansi c standard?

1487


How do you list files in a directory?

1156


Explain that why C is procedural?

1151


Is c dynamically typed?

1171


Can one function call another?

1123


When should a far pointer be used?

1145