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
What is the difference between struct and union in C?
Differentiate between Macro and ordinary definition.
What is sizeof c?
Why c is known as a mother language?
Tell me what are bitwise shift operators?
Explain Function Pointer?
Why malloc is faster than calloc?
What is use of integral promotions in c?
What are pragmas and what are they good for?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Are pointers really faster than arrays?
When should a type cast be used?
What is a char c?
What is restrict keyword in c?
What is pragma c?