answersLogoWhite

0


Best Answer

in stdio.h:

extern int printf (const char *fmt, ...);

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

int printf ( const char * format, ... );

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the prototype of printf function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Natural Sciences

What is a program to print electricity bill?

#include<stdio.h> #include<string.h> #include<conio.h> void main() { int cust_no, unit_con; float charge,surcharge=0, amt,total_amt; char nm[25]; clrscr(); printf("enter the customer IDNO :\t"); scanf("%d",&cust_no); printf("\nenter the customer Name :\t"); scanf("%s",nm); printf("\nenter the unit consumed by customer :\t"); scanf("%d",&unit_con); if (unit_con <200 ) charge = 1.20; else if (unit_con>=200 && unit_con<400) charge = 1.60; else if (unit_con>=400 && unit_con<600) charge = 2.00; else charge = 2.50; amt = unit_con*charge; if (amt>300) surcharge = amt*15/100.0; total_amt = amt+surcharge; if (total_amt < 25) total_amt =25; clrscr(); printf("\t\t\tElectricity Bill\n\n"); printf("Customer IDNO :\t%5d",cust_no); printf("\nCustomer Name :\t%s",nm); printf("\nunit Consumed :\t%5d",unit_con); printf("\nAmount Charges @Rs. %4.2f per unit :\t%8.2f",charge,amt); printf("\nSurchage Amount :\t%8.2f",surcharge); printf("\nNet Amount Paid By the Customer :\t%8.2f",total_amt); getch();}


How is Unakite formed?

Hydrothermal metamorphism of a granite prototype.


First form or type from which others are copied?

prototype


What is the purpose of a plastic prototype?

The purpose of a plastic prototype is to test invention, attract investors, and or get the companies to license the invention idea. And the overall purpose is to make you money from invention idea.


What is a category prototype?

A category prototype is a member of a category which describes the category best. For example, robins are prototypical birds (i.e. robins are prototypes of the category 'birds'). Of course, this greatly depends on perception and cultural knowledge.

Related questions

Is printf keyword?

== == 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.


What is printf function?

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


Write aprogram in c to calculate the cube of given integer number using function prototype?

#include <stdio.h> int findcube(int); // prototype int main() { int a,b; printf("Enter a number: "); scanf("%d",&a); b=findcube(a); printf("The cube of %d is %d\n",a,b); } int findcube(int x) { return x*x*x; }


What is the function and syntax of printf statement?

it's not a statement, it's a function: len= printf (format, ...more-parameters...);


What is printf in c plus plus programming?

printf is a function that prints formatted text to the standard output stream (stdout). To make use of it in C++, you must include cstdio or any file that includes cstdio. For more information, see related links.


When can a function prototype be omitted?

when we write definition of a function i.e; body of a function above main() function, then the function prototype be omitted. -Ramashankar Nayak,M.C.A,Pondicherry University


Why printf is used instead of print in c?

The printf() function prints a formatted string.


What is the cause of an error msg printf should have a prototype in C compiler?

You've forgotten this line: #include <stdio.h>


What errors do function prototype help prevent?

Syntax errors and prototype errors.


Can you use printf as a return value?

No, it is a function. But printf does return a value: the number of characters it has written.


What is the type of printf statement in C?

It is a function.


How you write a c program for making a call in gcc?

int main() { // Call the printf function printf("This is a function call!\n"); return 0; }