Explanatory Question
Example of call by value in C Program
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
#include void change(int,int); int main() { int a=10,b=20; change(a,b); //calling a function by passing the values of variables. printf("Value of a is: %d",a); printf("\n"); printf("Value of b is: %d",b); return 0; } void change(int x,int y) { x=13; y=17; }
Value of a is: 10 Value of b is: 20
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.