Consider the following program. Change the program so that the output of printf is always 10. It is not allowed to change main(). Only fun() can be changed.
We can use Macro Arguments to change the output of printf.
This article is contributed by Abhay Rathi. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- Using return value of cin to take unknown number of inputs in C++
- What does buffer flush means in C++ ?
- Unary operators in C/C++
- Operators in C / C++
- new and delete operators in C++ for dynamic memory
- Implementation of a Falling Matrix
- Code to generate the map of India (with explanation)
- scanf() and fscanf() in C - Simple Yet Poweful
- How to use getline() in C++ when there are blank lines in input?
- How to count set bits in a floating point number in C?
- Implement your own itoa()
- How to find length of a string without string.h and loop in C?
- Write a C program that does not terminate when Ctrl+C is pressed
- How to measure time taken by a function in C?
- Implement Your Own sizeof