what is op?
for(c=0;c=1000;c++)
printf("%c",c);

Answers were Sorted based on User's Feedback



what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / srsabariselvan

infinite loop.
and print the character associated with the 1000,1001,1002,....

Is This Answer Correct ?    0 Yes 0 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / vinoth

It will work fine no value or error will be displayed.

Is This Answer Correct ?    0 Yes 0 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / ashok

infinite loop

Is This Answer Correct ?    0 Yes 0 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / a programmer

This will print the ascii characters from 0 to 1000 if the
datat type of the variable c is other than character. If the
datatype of the variable is char then it will be into
infinite loop.

Is This Answer Correct ?    4 Yes 5 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / jay sean

The output of the given program is the character or ascii
value of 0,1,2,..........so on up to the stack of memory
get full.The reason behind it is the condition for
termination is not given in the for loop,because c=1000 is
assingment operator not a conditional.

Is This Answer Correct ?    0 Yes 1 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / manju

In each iteration the equivalent ascii values of 0 to 1000
will print.

Is This Answer Correct ?    5 Yes 8 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / sarath

in each iteration it will print the characters for ascii
values 0,1,2,3,...

Is This Answer Correct ?    6 Yes 11 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / shruti

It will give a compilation error..

the for loop syntax is
for(initialize; condition ; inc / dec)

condition -> assignment operator is wrong..

there should be 2 equals ("==")..

Is This Answer Correct ?    1 Yes 6 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / rohit

it will come out of the for loop & hence no output.
because,when c=0,then for next condition it will check
whether 0==1000,the condition fails here itself only.
so,it doesn't go for executing any statement.

Is This Answer Correct ?    1 Yes 6 No

what is op? for(c=0;c=1000;c++) printf("%c",c);..

Answer / p

answer 6 is absolutely correct

Is This Answer Correct ?    0 Yes 7 No

Post New Answer

More C Interview Questions

How to develop software using "c" programming?

1 Answers   IBM, TCS,


write a program to display numbers from 1 to 10 and 10 to 1?

2 Answers  


Can a local variable be volatile in c?

0 Answers  


How the processor registers can be used in C ?

7 Answers   HP,


program for comparing 2 strings without strcmp()

4 Answers  






any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  


Define macros.

0 Answers   Tech Mahindra,


What is keyword with example?

0 Answers  


When a c file is executed there are many files that are automatically opened what are they files?

0 Answers  


There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.

5 Answers   Yahoo,


Write a program to print factorial of given number without using recursion?

0 Answers  


for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable

2 Answers  


Categories