answersLogoWhite

0

Why printf is known as call by value?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

C language uses only one method for parameter-passing: call by value.

User Avatar

Wiki User

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

Wiki User

13y ago

It is not. It is known as a common library function which performs formatted output.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why printf is known as call by value?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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


Wap for swapping values of two variables using pointers as arguments to functions?

# include<stdio.h> # include<conio.h> void main() { clrscr(); int a,b; printf ("Enter the first value:"); scanf ("%d",& a ); printf ("Enter the second value:"); scanf ("%d",& b ); printf ("\n\nBefor swaping the values "); printf ("\nThe first value is %d",a); printf ("\nThe second value is %d",b); printf ("\n\nAfter swaping the values "); printf ("\nThe first value is %d",b); printf ("\nThe second value is %d",a); }


How do you write a program in C that variables change value with each other?

void main() { //variable declaration int a; int b; printf("\n Enter the first value"); scanf("%d",&a); printf("\n Enter the second value"); scanf("%d",&b); a=a+b; b=a-b; a=a-b; printf("\n After swap the value"); printf("\n value of A=%d",a); printf("\n value of A=%d",b); getch(); }


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; }


Can you declare printf for integer variable?

printf is declared in stdio.hFormat specifier for an integer value is %d.


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(); }


Can anyone give a logic in c plus plus to print something on screen using printf statement but without semicolon used after printf statement?

try to usecondition ? value if true : value if falseor: if (printf ("Hello")) {}


Write a c program to enter five different values in any array and find out valve by location and location by value?

//Made for 5 inputs THIS PROGRAM IS NOT COMPILED OR CHECKED SO PLEASE DO SO#include#includevoid main(){int arr[5], i,c,val;clrscr();for(i = 0; i


C programming about interchanging two values?

#include stdio.h #include conio.h void main() { void intrchng(int*,int*); int a,b; printf("enter 1st value a:"); scanf("%d",&a); printf("\nenter 2nd value b:"); scanf("%d",&b); printf("\n after interchanging,outputs are\n"); intrchng(&a,&b); printf("value of a: %d",a); printf("value of b:%d",b); } void intrchng(int* ptra,int* ptrb) { int* temp; temp = ptra; ptra= ptrb; ptrb= temp; } }


What does a return value of zero from printf mean?

empty format-string.


What is a call value?

While calling a function, if the arguments supplied are the original values it is called call by value. e.g. int sum(int a, int b) { return (a+b); } int main() { int a=10; int b=20; printf("Sum is %d",sum(a,b)); return 1; }