how many times does the loop iterated ?
for (i=0;i=10;i+=2)
printf("Hi\n");
Answer Posted / vignesh1988i
this will give an warning message .....
it will print the "Hi" infinite times...... since we used
assignment opeartor in the termination condition of the
looping statement....
when i is initilized to 0 first.. again i=10 is been
initilized to 10... so however i is been incremented by 2 or
by n times.... i=10.. which will be an non zero value.... so
it wont come out of the loop.... infered as infinite running.
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Add Two Numbers Without Using the Addition Operator
What is difference between stdio h and conio h?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
What Is The Difference Between Null And Void Pointer?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Define and explain about ! Operator?
How can I make sure that my program is the only one accessing a file?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Is there a built-in function in C that can be used for sorting data?
What are pointers? What are different types of pointers?
What are global variables?
Explain what does it mean when a pointer is used in an if statement?
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 main () in c language?