What is the output of the program given below
#include<stdio.h>
main()
{
char i=0;
for(;i>=0;i++) ;
printf("%d\n",i);
}
Answer Posted / madhu
127.As i is a char the last digit would be 127,so the loop
stops at that point.
I crosschecked it writing a program.
| Is This Answer Correct ? | 1 Yes | 9 No |
Post New Answer View All Answers
What is the difference between text files and binary files?
What do you understand by friend-functions? How are they used?
What are dangling pointers? How are dangling pointers different from memory leaks?
Explain #pragma statements.
Hi can anyone tell what is a start up code?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
What is the use of getchar() function?
What is 02d in c?
Why we use int main and void main?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What does void main return?
Why is python slower than c?
How can you access memory located at a certain address?
What is the use of function in c?
What do you mean by dynamic memory allocation in c?