Explain this code.
#include <stdio.h>
void f1(int *k)
{
*k = *k + 10;
}
main ( ){
int i;
i = 0;
printf (" The value of i before call %d \n", i);
f1 (&i);
printf (" The value of i after call %d \n", i);
}
Answer Posted / pooja agarwal
10
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is sizeof in c?
How to declare pointer variables?
What is p in text message?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
How do you convert strings to numbers in C?
What is the use of typedef in structure in c?
What is the general form of function in c?
What are pointers? What are different types of pointers?
What is fflush() function?
What is a pointer on a pointer in c programming language?
What does it mean when the linker says that _end is undefined?
How do we print only part of a string in c?
Who is the main contributor in designing the c language after dennis ritchie?
What are volatile variables in c?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80