Get Started
839

Q: If I use the following printf() to print a long int why I am not warned about the type mismatch? printf ("%d",num );

  • Show Answer
  • Workspace

Answer :
Explanation :

When a function accepts a variable number of arguments , its prototype cannot provide any information about the number of arguments and type of those variable arguments. Hence the compiler cannot warn about the mismatches. The programmer must make sure that arguments match or must manually insert explicit typecast.

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today