1)what is the error in the following stmt where str is a
char array and the stmt is supposed to traverse through the
whole character string str?
for(i=0;str[i];i++)
a)There is no error.
b)There shud be no ; after the stmt.
c)The cond shud be str[i]!='\0'
d)The cond shud be str[i]!=NULL
e)i shud be initialized to 1
Answer Posted / niranjan kumar niraj
b)The cond shud be str[i]!='\0'
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the use of fflush() function?
What is #include stdlib h?
What is your stream meaning?
How many keywords (reserve words) are in c?
What is class and object in c?
What is the size of empty structure in c?
What are enumerated types?
How can I call fortran?
What is advantage of pointer in c?
Explain union.
What are reserved words?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
What are the similarities between c and c++?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Explain how do you determine a file’s attributes?