I am very new to programming. Now I am learning C. Please look at this following code snippet -
printf("StudentId: %d CGPA: %f", id, cgpa);
printf("Name: %s StudentId: %d CGPA: %f", name, id, cgpa);
I know function takes argument. So I think, the both the first and second printf() methods takes only two arguments -
1. first argument inside the double quote that is - "StudentId: %d CGPA: %f" or "Name: %s StudentId: %d CGPA: %f"
2. and second one is outside the quote that is - id, cgpa or name, id, cgpa
Now my question is - am I right while I'm thinking that prinf() methods takes only two arguments no matter how many variable (that is id, cgpa, name or even department) are placed after the double quotes?
Or If printf() method takes multiple argument then how it is handled in C?