cin>>a(where a has been declared int)(what if user enters char)
| kamalsharma007 (3) | |||
| Hi, what is the output of foll. prog and why? #include<iostream.h> #include<conio.h> void main() { int a,b; clrscr(); cin>>a>>b; cout<<"\n"<<a<<"\n"<<b; getch(); } if 'A'(character 'A' instead of any Integer value) is given as its first input what will happen and why??? | |||
| guestgulkan (252) | |||
| You can always try it and find out. | |||
| firedraco (336) | |||
| Um, IIRC, it will glitch and start spamming you with messages and stuff...so don't do it. And no, I don't know why. | |||
This topic is archived - New replies not allowed.
