0

The below C program takes two input a,b but when executed it asks for another null input before printing the sum of a,b. Why?

#include <stdio.h> #include<conio.h> int main() { int a,b; printf("Enter the value of a&b:\n"); scanf("%d %d ",&a,&b); printf("Sum:%d",a+b); return 0; }

28th May 2021, 3:42 PM
SATYAM SINGH
SATYAM SINGH - avatar
1 Answer
0
But what actually happens when we add a whitespace at the end in the format specifiers?
29th May 2021, 2:51 AM
SATYAM SINGH
SATYAM SINGH - avatar