ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what is op?
for(c=0;c=1000;c++)
printf("%c",c);
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 1
infinite loop
 
Is This Answer Correct ?    6 Yes 2 No
Guest
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 2
in each iteration it will print the characters for ascii
values 0,1,2,3,...
 
Is This Answer Correct ?    2 Yes 3 No
Sarath
 
 
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 3
I think it will print ascii values of 0,1,2 and so on upto 1000
 
Is This Answer Correct ?    2 Yes 4 No
Ashok
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 4
It will print funny caharcter ( ascii equivalent of 1000 
trucated char) infinitely
 
Is This Answer Correct ?    3 Yes 0 No
Vikas Chauhan
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 5
In each iteration the equivalent ascii values of 0 to 1000 
will print.
 
Is This Answer Correct ?    4 Yes 1 No
Manju
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 6
it show compliation error
 
Is This Answer Correct ?    3 Yes 4 No
Deep
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 7
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 ?    2 Yes 2 No
A Programmer
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 8
It print's only what's the ASCII value of 1000 for infinite loop
 
Is This Answer Correct ?    2 Yes 0 No
Sriharsha
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 9
answer 6 is absolutely correct
 
Is This Answer Correct ?    0 Yes 3 No
P
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 10
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 ?    0 Yes 2 No
Shruti
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 11
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 ?    0 Yes 3 No
Rohit
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 12
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
Jay Sean
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 13
warning occurs as possibly incorrect statement.
and the statement falls into infinite loop printing the 
ascii character equivalent to 0
 
Is This Answer Correct ?    1 Yes 2 No
M.kiran Kumar
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 14
i executed this program it went on displaying funny
characters indefinite loop
 
Is This Answer Correct ?    2 Yes 0 No
Karthik
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 15
It goes into an infinite loop.

The compiler will check only the syntax, it is upto the 
programmer to implement correct logic.

other than initialization, c is always 1000 and there is no 
condition to be break the loop
 
Is This Answer Correct ?    2 Yes 0 No
Abdur Rab
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 16
it will goto infinite loop because each time i=0 and i=100 
so it will goto infinite loop.
 
Is This Answer Correct ?    0 Yes 0 No
Dally
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 17
It will go for infinite loop. 
But in each iteration, c is assigned with the value 1000.
So each time it will print a character of ascii=1000.
 
Is This Answer Correct ?    1 Yes 0 No
Ksprasad
 
  Re: what is op? for(c=0;c=1000;c++) printf("%c",c);
Answer
# 18
Warnings: 

Test expression for for is assignment expression: c = 1000
The condition test is an assignment expression. Probably,
you mean to use == instead of =. If an assignment is
intended, add an extra parentheses nesting(e.g., if ((a =
b)) ...) to suppress this message. (Use -predassign to 
inhibit warning)

Test expression for for not boolean, type int: c = 1000.
Test expression type is not boolean or int. (Use
-predboolint to inhibit warning)
 
Is This Answer Correct ?    1 Yes 0 No
Sreekanth
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what is meant by the "equivalence of pointers and arrays" in C? Satyam3
What is the difference between static and global variables?  1
how many times of error occur in C  7
pgm to find middle element of linklist(in efficent manner) Huawei2
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case TCS7
how to return 1000 variables from functio9n in c?plz give me code also  5
write a recursive program in'c'to find whether a given five digit number is a palindrome or not  1
Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986  1
find second largest element in array w/o using sorting techniques? use onle one for loop. Zycus-Infotech2
Which command is more efficient? *(ptr+1) or ptr[1]  3
pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example? Excel2
wite a programme in c to linear search a data using flag and without using flags? TCS3
Convert the following expression to postfix and prefix (A+B) * (D-C) Satyam2
What is volatile  2
Explain what?s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?  1
ABCDCBA ABC CBA AB BA A A  1
HOW TO SWAP TWO NOS IN ONE STEP? Satyam12
Write a Program to print this triangle: * ** * **** * ****** * ******** * ********** use two nested loops. TCS5
1 232 34543 4567654 can anyone tell me how to slove this c question  3
WHAT IS THE DIFFERANCE BITWIN GETS();AND SCANF();  2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com