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
Answers were Sorted based on User's Feedback
ANS: Prints all the ascii characters from 0 to 255 in the below format
0=
1=☺
2=☻
3=♥
4=♦
5=♣
6=♠
.
.
.
251=√
252=ⁿ
253=²
254=■
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 |
What is the -> in c?
Explain data types & how many data types supported by c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
In a switch statement, explain what will happen if a break statement is omitted?
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What standard functions are available to manipulate strings?
Where in memory are my variables stored?
Explain how do you print an address?
program for comparing 2 strings without strcmp()
what is the full form of c language
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR