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 / vinod
Options D,E are correct for this
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Differentiate between the = symbol and == symbol?
simple program of graphics and their output display
Why isn't any of this standardized in c? Any real program has to do some of these things.
What is pass by reference in c?
What are the differences between new and malloc in C?
write a program fibonacci series and palindrome program in c
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
Explain how do you list a file’s date and time?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
Explain the bubble sort algorithm.
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
How can I convert a number to a string?
How does #define work?
Are there any problems with performing mathematical operations on different variable types?
What is pointer in c?