answersLogoWhite

0

print means print, f means formatting

or

printf is a output statement function in the C run-time library

example:

printf ("the value of A is %d\n", A);

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What purpose do braces serve in C programming?

grouping statements. eg: if (i==2) printf ("i=="); printf ("2"); and if (i==2) { printf ("i=="); printf ("2"); } do different things, if i<>2


C programming diamond shape for loops Problem and output sample is in the picture?

#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }


Where the printf statements are stored in memory?

Try this: #include <stdio.h> int main (void) { printf ("printf is at location %p\n", (void *)printf); printf ("main is at location %p\n", (void *)main); return 0; }


How can you print percent d on the screen using printf?

printf("Your text here %d", your_data); or maybe you want to see '%d' as output? Try one of these: printf ("%%d"); printf ("%cd", '%'); printf ("%s", "%d"); fputs ("%d", stdout);


Can you give me an example a program of turbo c that determine a zodiac sign?

#include <stdio.h> int main() { int month,date; printf("Enter the month and date of your birth in the format mm-dd:\n"); scanf("%d-%d",&month,&date); if(month<1month>12date<1date>31) { printf("That is not a valid date.\n"); return 1; } printf("Your zodiac sign is "); switch(month) { case 1: if (date<20) printf("Capricorn\n"); else printf("Aquarius\n"); break; case 2: if (date<19) printf("Aquarius\n"); else printf("Pisces\n"); break; case 3: if (date<21) printf("Pisces\n"); else printf("Aries\n"); break; case 4: if (date<20) printf("Aries\n"); else printf("Taurus\n"); break; case 5: if (date<21) printf("Taurus\n"); else printf("Gemini\n"); break; case 6: if (date<21) printf("Gemini\n"); else printf("Cancer\n"); break; case 7: if (date<23) printf("Cancer\n"); else printf("Leo\n"); break; case 8: if (date<23) printf("Leo\n"); else printf("Virgo\n"); break; case 9: if (date<23) printf("Virgo\n"); else printf("Libra\n"); break; case 10: if (date<23) printf("Libra\n"); else printf("Scorpio\n"); break; case 11: if (date<22) printf("Scorpio\n"); else printf("Sagittarius\n"); break; case 12: if (date<22) printf("Sagittarius\n"); else printf("Capricorn\n"); break; } return 0; }

Related Questions

What is a purpose of printf and scanf statements?

we write printf() b/c it printf or show us the value contained in a value on the screen after pressing ctrl+f9.


What purpose do braces serve in C programming?

grouping statements. eg: if (i==2) printf ("i=="); printf ("2"); and if (i==2) { printf ("i=="); printf ("2"); } do different things, if i<>2


Can you use nested printf?

printf ("nested printf returned %d\n", printf ("inner printf\n"));


C programming diamond shape for loops Problem and output sample is in the picture?

#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }


Write a program to find the largest of three numbers and print the output in ascending order?

void main() { int a,b,c; clrscr(); printf("Enter the value of a:"); scanf("%d",&a); printf("\nEnter the value of b:"); scanf("%d",&b); printf("\nEnter the value of c:"); scanf("%d",&c); if(a>b) { if(a>c) { if(b>c) { printf("c is smallest\n"); printf("b is middle\n"); printf("a is largest\n"); } else { printf("b is smallest\n"); printf("c is middle\n"); printf("a is largest\n"); } } else { printf("b is smallest\n"); printf("a is middle\n"); printf("c is largest\n"); } } else if(b>c) { if(a>c) { printf("c is smallest\n"); printf("a is middle\n"); printf("b is largest\n"); } else { printf("a is smallest\n"); printf("c is middle\n"); printf("b is largest\n"); } } else { printf("a is smallest\n"); printf("b is middle\n"); printf("c is largest\n"); } getch(); }


What is printf function?

Printf function is used in c language. Printf is used to print something to the standard output. ex: printf ('welcome');


What is printf with examples?

print f() 1.function 2.built in 3.user only use 4.out put purpose


What is the prototype of printf function?

in stdio.h:extern int printf (const char *fmt, ...);


Where the printf statements are stored in memory?

Try this: #include <stdio.h> int main (void) { printf ("printf is at location %p\n", (void *)printf); printf ("main is at location %p\n", (void *)main); return 0; }


How do you write a c program to print words when numbers are given?

void print_num_as_word (unsigned num) { switch (num) { case 0: printf ("zero"); break; case 1: printf ("one"); break; case 2: printf ("two"); break; case 3: printf ("three"); break; case 4: printf ("four"); break; case 5: printf ("five"); break; case 6: printf ("six"); break; case 7: printf ("seven"); break; case 8: printf ("eight"); break; case 9: printf ("nine"); break; } }


What should be given at in if printf hello else world to get the output helloworld that is to make both the statements in ifelse clause to execute what should be given in if clause?

main() { if( !fork() ) printf("Hello"); else printf("World"); } This works fine. if (!printf("hello")) printf("Hello"); else printf(" World\n");


Write a program in c language to print a diamond?

// // THIS IS A MACH SIMPLER SOLUTION: // void Diamond(int n) { for (int i=0;i<=2*n;i++,printf("\n")) for (int j=0;j<=2*n;j++) (abs(i-n)+abs(j-n)<=n ? printf("*") : printf(" ")); } //============================================= #include<stdio.h> main() { int i,j,k,n,a,b,c,x; printf("enter the # of rows of graphical output"); scanf("%d",&n); /* UPPER HALF OF KITE */ for(i=1;i<=n;i++) { printf("\t"); for (k=1;k<=(n-i);k++) { printf(" "); } for(j=0;j<i;j++) { printf("*"); printf(" "); } for(k=1;k<=(n-i-1);k++) { printf(" "); } printf("\n"); } /* LOWER PART OF KITE */ for(i=(n-1);i>0;i--) { printf("\t"); for (k=(n-i);k>0;k--) { printf(" "); } for(j=i;j>0;j--) { printf("*"); printf(" "); } for(k=(n-i-1);k>0;k--) { printf(" "); } printf("\n"); } getch(); }