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
Describe wild pointers in c?
What is openmp in c?
What is difference between far and near pointers?
Explain what are the different file extensions involved when programming in c?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
What is the purpose of void in c?
What are nested functions in c?
Can i use “int” data type to store the value 32768? Why?
What is the code for 3 questions and answer check in VisualBasic.Net?
Compare interpreters and compilers.
What is the significance of c program algorithms?
Why do we use int main?
In which language linux is written?
What is bubble sort technique in c?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix