How to implement variable argument functions ?
Variable-argument functions in C are inherently unsafe
since there is no language-level mechanism to ensure that
the actual arguments agree in type and number with the
arguments that the function will be using. There are
several ways to implement variable argument functions in C
You can try to implement such function by taking the
address of a formal argument and working your way through
the stack frame.A better alternative is to use the
__builtin_next_arg function on gcc and then work your way
up the stack. You can write your variable argument
functions using the standard macros in <stdarg.h> and
<vararg.h>.
Is This Answer Correct ? | 8 Yes | 2 No |
What are the different properties of variable number of arguments?
WAP to find that given no is small or capital
What is wrong in this statement? scanf(“%d”,whatnumber);
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
To what value do nonglobal variables default? 1) auto 2) register 3) static
Program to find largest of three numbers without using comparsion operator?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What is nested structure in c?
Why can’t constant values be used to define an array’s initial size?
What is break in c?
Explain what happens if you free a pointer twice?
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?