A Function is a combined block of instructions written to perform a specific task. A function takes a value and after performing requisite processing, it returns the value in the program. Lets have a look over the different questions on Functions in C Language that can be asked in interview, exams and other places. The Questions with their answers are as follow- C interview question and answer C Language role Q1. What is the output of the following program? main() { int x=20; int y=10; swap(x,y); printf(“%d %d”,y,x+2); } swap(int x,int y) { int temp; temp =x; x=y; y=temp; } Ans: 10 22 (duplicate copy of arguments are generated on calling a function) Q2. What will be the output of the following code ? output() { printf(“%p”,output); } Read More Questions on Functions in C Language
Related Articles -
C language, Functions, Static Function,
|