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 does do in c?
What are the main characteristics of c language describe the structure of ac program?
What are pointers? What are stacks and queues?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
what will be the output for the following main() { printf("hi" "hello"); }
How to set file pointer to beginning c?
How do I determine whether a character is numeric, alphabetic, and so on?
How can variables be characterized?
Explain the difference between malloc() and calloc() function?
is it possible to create your own header files?
What are the usage of pointer in c?
What does the message "automatic aggregate intialization is an ansi feature" mean?
Why n++ execute faster than n+1 ?
What is identifier in c?
What is ctrl c called?