+ 2

What happens when more than one variable is required and the user inputs only one variable?

15th Jul 2016, 9:31 AM
Shashwat Garg
Shashwat Garg - avatar
4 odpowiedzi
+ 4
if more than one variable is required and only one variable is inputed then the compiler might take sone garbage value (value in the memory from some old program) or might show an error..
15th Jul 2016, 9:42 AM
SIDDHARTH VASU
SIDDHARTH VASU - avatar
+ 2
it generally generates an error but if you give it a default value it will make it work good
15th Jul 2016, 4:23 PM
Navneet
+ 1
an error
15th Jul 2016, 9:59 AM
Shatmanliev Toktonazar
Shatmanliev Toktonazar - avatar
+ 1
the computer will wait so you can input the next value, for example I want to add two integers , I declare both variables and I read them in program. after compiling I imput one number and prompter waits till I imput the second, after it outputs the sum. I f I forgot to declare the second variable but I wrote it in sum expression, an error occurs.
15th Jul 2016, 5:49 PM
Cristi
Cristi - avatar