Skip to content
Home » Finding the Number of Conversion Characters in scanf Function in C

Finding the Number of Conversion Characters in scanf Function in C

Learn about Finding the Number of Conversion Characters in scanf Function in C in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.

Finding the Number of Conversion Characters in scanf Function in C

The below program finds the Number of Conversion Characters in scanf Function.

Program:

#include<stdio.h>
int main()
{
  int a, b, c;
  printf("Enter two integer number:");
  c = scanf("%d %d", &a, &b );

  printf("a=%d, b=%d, c=%d\n", a, b, c);
  return 0;
}

Output:

Enter two integer number:3 6
a=3, b=6, c=2

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Codes :
C Program to Display Equivalent Octal and Hexadecimal Value
Three-Digit Integer Number in Reverse Order