C/C++ Is the Semicolon Used as a Statement Delimiter in C++?

  • Thread starter Thread starter mdnazmulh
  • Start date Start date
  • Tags Tags
    C++
AI Thread Summary
The semicolon (;) is confirmed as a statement terminator in C++. It allows multiple statements to be written on a single line, provided they are separated by semicolons. However, for the sake of program readability, it is generally advisable to avoid cramming too many statements into one line. The discussion emphasizes that while it's technically possible to write multiple statements in one line, maintaining legibility is crucial for effective coding practices.
mdnazmulh
Messages
51
Reaction score
0
Is the semicolon (;) used as statement delimiter in C++?

I have been knowing that semiclon is statement terminator.

Another confusion:
I think, we can write as many as statements we wish in a single line and of course separating them by semicolon. But to ensure program readability we don't do that.
Am I correct?
 
Technology news on Phys.org
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top