What is the output of the program given below
main()
{
signed char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answer Posted / susie
Answer :
-128
Explanation
Notice the semicolon at the end of the for loop. THe initial
value of the i is set to 0. The inner loop executes to
increment the value from 0 to 127 (the positive range of
char) and then it rotates to the negative value of -128. The
condition in the for loop fails and so comes out of the for
loop. It prints the current value of i that is -128.
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
how to test pierrot divisor
Sir... please give some important coding questions asked by product companies..
why nlogn is the lower limit of any sort algorithm?
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
How to palindrom string in c language?
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Design an implement of the inputs functions for event mode
Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.
What is data _null_? ,Explain with code when u need to use it in data step programming ?
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
Write a routine to implement the polymarker function
write a program for area of circumference of shapes
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail
Develop a routine to reflect an object about an arbitrarily selected plane