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 how can a program be made to print the name of a source file where an error occurs?
Hi can anyone tell what is a start up code?
How to explain the final year project as a fresher please answer with sample project
What is character constants?
What does typeof return in c?
What is a macro?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Can a variable be both static and volatile in c?
When should structures be passed by values or by references?
What is difference between static and global variable in c?
Explain what does the format %10.2 mean when included in a printf statement?
Are there any problems with performing mathematical operations on different variable types?
What is the difference between procedural and declarative language?
What Is The Difference Between Null And Void Pointer?
What are the types of data files?