The only way i see is to use :
using the right file descriptor
int main (void) { if(printf("Print whatever you want")) { } }
try to usecondition ? value if true : value if falseor: if (printf ("Hello")) {}
Printf function is used in c language. Printf is used to print something to the standard output. ex: printf ('welcome');
The printf() function prints a formatted string.
If you forget the semicolon, your program won't compile.
#include<stdio.h> Void main() { int a,b; printf("Enter a Number: "); // for print function as an out-put scanf("%d",&a); //for scan function as in input /* Here we can use print function once again as: */ a=a++; printf("%d",a); }
its quite simple using printf function
== == What is printf in c or prototype of printf with example (q) What is prototype of printf function ? Explain each term. Ans: Prototype of printf function is : int printf( const char *format ,…) Explanation of each term : Parameter of printf function is : (three continuous dots) : It is called ellipsis. It indicates the variable number of arguments. Example of ellipsis: #include void ellipsis(int a,...); void main() { int a=5,b=10; clrscr(); ellipsis(a,b); getch(); } void ellipsis(int a,...) { printf("%d ",a); } Output:5 So printf function can have any number of variables as an argument.
#include<stdio.h> #include<conio.h> void main() { if(printf("hello world")){} if(getch()){} }
use cout << simple
print means print, f means formattingorprintf is a output statement function in the C run-time libraryexample:printf ("the value of A is %d\n", A);
printf("%u %+d %+d",200,200,-200); //will print 200 +200 -200