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

Explain what is the concatenation operator?

1111


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1174


What is the main difference between calloc () and malloc ()?

1099


Explain b+ tree?

1009


How can I call fortran?

998


What are the properties of union in c?

997


What is variables in c?

985


Explain what is the heap?

1016


Write a C program in Fibonacci series.

1049


What language is lisp written in?

1170


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2302


Tell me when is a void pointer used?

1105


How can I sort a linked list?

977


What is calloc malloc realloc in c?

1013


What is variable in c example?

994