Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


can we print any string without using terminator?

Answers were Sorted based on User's Feedback



can we print any string without using terminator?..

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

can we print any string without using terminator?..

Answer / ashutosh

the format should b like this

void main()
{
if(printf("i luv u deepa")
{
}
}

Is This Answer Correct ?    17 Yes 3 No

Post New Answer

More C Interview Questions

du u know test pattern for robosoft? Plz share

1 Answers   RoboSoft, TATA, Wipro,


I want tcs placement papers of 2004-2009 , its urgent

6 Answers   TCS, Wipro,


C language questions for civil engineering

0 Answers   Tech Mahindra,


How do you initialize pointer variables?

0 Answers  


Why is event driven programming or procedural programming, better within specific scenario?

0 Answers   Wipro,


What is meant by gets in c?

0 Answers  


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

0 Answers   TCS,


enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

4 Answers   ME,


how to get the starting address of file stored in harddisk through 'C'program.

2 Answers   Siemens,


What is #include called?

0 Answers  


write a program to find the given number is prime or not

2 Answers   Accenture, Vasutech,


What is console in c language?

0 Answers  


Categories