+ 1
If we stored an array of 100 character.. like char a[100]; gets(a); after giving the input as 500 will it run or not?
4 ответов
+ 2
Just in case you mean input that is 500 characters long, yes it runs, but it will most likely overwrite other variables or code and corrupt the stack, causing the program to crash.
This is why you shouldn't use gets as it is a huge security hole.
0
yes 500 will run
a confusion is if a[100] then how will it run on 500..
actually I don't know array..
that's why great confusion is there