+ 1

Why is no datatype before num1 = num2

#include <stdio.h> int main() { int num1 = 15, num2 = 100; // assign the value of num2 to num1 num1 = num2; printf("num1 is %d", num1); return 0; }

6th Oct 2022, 4:14 PM
Richard Adu
2 Answers
+ 1
Because you have already declared these variables so don't need to declare again an again
6th Oct 2022, 4:27 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
0
Thanks
7th Oct 2022, 6:39 AM
Richard Adu