Why is no datatype before num1 = num2 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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