void main()
{
for(int i=0;i<5;i++);
printf("%d",i);
}
What is the output?..
Answers were Sorted based on User's Feedback
Answer / kumaran
declaring int i inside for loop is not available in
traditional 'c'
| Is This Answer Correct ? | 80 Yes | 30 No |
Answer / mahfooz
we can not declare loop condition variable in c..we can do
in c++.
| Is This Answer Correct ? | 38 Yes | 20 No |
Answer / samir isakoski
why shoul have a cout if is c++
buth this is c (printf)
and why cannot daclare a int in the for ciclus
| Is This Answer Correct ? | 17 Yes | 11 No |
Answer / divya
no output because the for loop is terminated with a semicolon which means the loop will terminate at once.
| Is This Answer Correct ? | 15 Yes | 12 No |
Answer / shilpi
it will give 6 as a answer because condition is true inside and then it will increase its value by 1 and the terminate from the loop.
| Is This Answer Correct ? | 2 Yes | 0 No |
hi friend i am ricky dobriyal.
if this programe in c then this program produce error
expression syntex error.
if in c++ then it will produce o/p=5
| Is This Answer Correct ? | 10 Yes | 9 No |
Answer / pramod
if it is in C it displays an error "indicating that "i"
cannot be declared in loop and i as undefined symbol"
if it the case of C++ it displays "5" because C++ supports
dynamic declaration and once declared anywhere in the
program(even in loops) can be used anytime in that program
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / marius
if i have
$x=(11,22,33,44,55);
for($i=0;$i<5;$i++)
echo$x[$i]." ";
and we will print this:
11 22 33 44 55
$i=0 => 11
$i<5 => 44
$i++ => 55
ghigamarius@gmail.com
| Is This Answer Correct ? | 1 Yes | 2 No |
what is meant by linking error? how can i solve it? if there is a linking error " unable to open file 'cos.obj'? then what should i do?
what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?
Given that two int variables, total and amount , have been declared, write a sequence of statements that: initializes total to 0 reads three values into amount , one at a time. After each value is read in to amount , it is added to the value in total (that is, total is incremented by the value in amount ). Instructor's notes: If you use a loop, it must be a for loop. And if you use a loop control variable for counting, you must declare it.
what is run time error?
#include<stdio.h> void main() { int i=1; printf("%d%d%d",i++,++i,i); }
#include<>stdio.h> #include<>conio.h> { printf("hello"); void main() getch(); } what the out put of this program and why ......plz clear my answer
What are the different types of errors in C and when they occur?
I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00
I can not get my C++ program to work right. It is supposed to tell if a word is a palindrome or not, but it only tells thet the word is not a palindrome. And I can't fix it.
wap for bubble sort
void main() { int i=1; printf("%d%d%d",i,++i,i++); } Cau u say the output....?
What is probability to guarantee that the task a programmer is going to create will be created and be able to run on a particular system (RTOS/GPOS).