can we print any string without using terminator?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ashutosh
the format should b like this
void main()
{
if(printf("i luv u deepa")
{
}
}
| Is This Answer Correct ? | 17 Yes | 3 No |
du u know test pattern for robosoft? Plz share
1 Answers RoboSoft, TATA, Wipro,
I want tcs placement papers of 2004-2009 , its urgent
C language questions for civil engineering
How do you initialize pointer variables?
Why is event driven programming or procedural programming, better within specific scenario?
What is meant by gets in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
how to get the starting address of file stored in harddisk through 'C'program.
What is #include called?
write a program to find the given number is prime or not
2 Answers Accenture, Vasutech,
What is console in c language?