Coding | Mcqs | Multiple choice questions | Informative | Computer Science | Engineering | Aptitude | Quants | Verbal

INFEED

Getting space separated input without specified N in c & c++

 In some situation you must get the inputs without specified n

so you can use scanf statement with while loop

like this 👇👇👇:


int a;

while(scanf("%d",&a)>0)

{

//statements

}


Post a Comment

Previous Post Next Post