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 logical errors and how does it differ from syntax errors?
Why does not c have an exponentiation operator?
i have a written test for microland please give me test pattern
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
Explain what is a 'locale'?
What's the total generic pointer type?
What is volatile, register definition in C
how many key words availabel in c a) 28 b) 31 c) 32
What is the best way to store flag values in a program?
What is quick sort in c?
How to explain the final year project as a fresher please answer with sample project
write a program to print largest number of each row of a 2D array
Define the scope of static variables.
Why is c so powerful?
Why is c so popular?