can we print any string without using terminator?
Answer Posted / yogesh bansal
Yes, We can print the string without using the terminator.
like this
#include <stdio.h>
int main()
{
if(printf("this is yogesh"))
{
printf("then you must be good boy");
}
return 0;
}
Its a working example. when the control comes to if()
statement. first it will execute the printf statement inside
if() and the printf function will return number of character
printed which is an integer value and if() is true for any
value greater than 0. so it will go inside and execute the
rest of the code.
Hope the explanation is clear to you.
| Is This Answer Correct ? | 30 Yes | 3 No |
Post New Answer View All Answers
What is file in c preprocessor?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
Does * p ++ increment p or what it points to?
What is the explanation for modular programming?
Write a c program to demonstrate character and string constants?
Explain what does a function declared as pascal do differently?
The difference between printf and fprintf is ?
What is spaghetti programming?
code for find determinent of amatrix
What is masking?
Explain continue keyword in c
Explain the advantages of using macro in c language?
How can I avoid the abort, retry, fail messages?
How can a number be converted to a string?
what is the height of tree if leaf node is at level 3. please explain