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 |
Find errors (1) m = ++a*5; (2) a = b ++ -c*2; (3)y = sqrt (1000);
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
what is output of the following statetment?Printf(“%x”, -1<<4); ?
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1
Explain how can I open a file so that other programs can update it at the same time?
Tell about strtok & strstr functions
2 Answers HCL, iFlex, Motorola,
if we take a number as a char then can we manipulate(add, subtract) on this number
How to print India by nested loop? I IN IND INDI INDIA
write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.
What are the advantage of c language?
What is C++
Write a c program to demonstrate Type casting in c?