why there is semicolon after loop while();

后端 未结 4 507
天命终不由人
天命终不由人 2020-12-18 10:54

I am reading a code of my friend an I see this:

#include 
#include 

void main()
{
    char string1[125], string2 [10];
    in         


        
4条回答
  •  心在旅途
    2020-12-18 11:08

    That is called a semicolon. In programming standards, the ; signifies an end of statement, or in this case that it is a null statement. It is effectively a non operation in the body of the while loop, so it is not actually doing anything.

提交回复
热议问题