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 are header files why are they important?
What is spaghetti programming?
what is the different bitween abap and abap-hr?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What is an lvalue in c?
Why do we use header files in c?
Define Spanning-Tree Protocol (STP)
Explain built-in function?
What are the types of operators in c?
what are the 10 different models of writing an addition program in C language?
Can you define which header file to include at compile time?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.
How can I get the current date or time of day in a c program?
how is the examination pattern?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25