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 / rajesh
options A and C are correct....
Check it in C programming online editor www.codepad.org
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What are valid signatures for the Main function?
What are extern variables in c?
Difference between linking and loading?
What is volatile variable in c?
Tell me what is null pointer in c?
How was c created?
What is the g value paradox?
What math functions are available for integers? For floating point?
How many parameters should a function have?
What is a stream?
What is the purpose of sprintf?
What is the return type of sizeof?
How do you construct an increment statement or decrement statement in C?
What is meant by preprocessor in c?
How do you view the path?