How could it be possible to read and write past the array

后端 未结 3 2084
一整个雨季
一整个雨季 2020-12-12 05:42

Output of the program:

#include 

int main()
{
    int size;

    printf(\"Enter the size of array: \");
    scanf(\"%d\",&size);

    i         


        
3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-12 06:18

    you could use a for cycle instead of a while so instead of while(i++you could use for(i = 0; i < size; i++) that should solve your problem my friend :)

提交回复
热议问题