answersLogoWhite

0

Most of C/C++ will support two types of comments:

* // Comment text goes here (aka inline)

* /* Comment goes here */ (aka block)

But the first comment type is not in ANSI C standard, you will get an error message.

In order to compile your program with ASNI C standard using GCC, I suggest this:

gcc -Wall -ansi -pedantic -o

Removing "-ansi" would allow usage of the first type comments in C language.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Comment on this statement?

"Comment on this statement." is an imperative sentence.The subject of the sentence is implied, "You comment on..."


What is the synonyms of remark?

Some synonyms for "remark" include comment, observation, and statement.


What is a correct way to add a comment in PHP?

There are many ways to comment in PHP, all of them valid: /* Classic C style, which allows you to comment blocks rather than single lines */ // C++ Style, which remarks the remainder of a single line # bash style, which also is a rest-of-the-line comment


What are the symbols used to write comments?

In C++ we use // to begin a comment. A comment can begin anywhere on a line, even after a code statement, and will extend to the end of the line until a newline character is encounter. Multiple lines of comments must each begin with //. We can also use C-style comments, which begin with /* and end with */. These comments can extend across multiple lines, or can be used to comment out code within a statement.


Can comment span more than one line in c?

Yes, you can use the multiline comment. Start the comment with /* and end the comment with */


Comment on save oil save money?

This is a statement not a question.


What is a pqc paragraph?

A stands for awnser c stands for comment q stands fote qoute from the text c stands for comment # 2


Definition of comments in c plus plus?

In C++, you can write comments two different ways. The old way, which is C compatible, is to bracket the commented text with /* and */. These comment operators extend across lines. The new way, for C++, is the single line comment. You start the comment with //, and everything from that point to the end of the current line is a comment.Note: You can use the preprocessor as well:#if 0Many many lines of comments#endif


What is single line comments as used in C programming?

single line comment are comment written in single line.in c there are two types of comment single line and multiple line.single line comment is written using // and multiple line comment is written between /*comment*/.compiler does not compile comments.it is used for better understanding of program.


Difference between a statement and a comment?

We can state our opinion as well as state the facts. Generally however, a comment is more of a reaction, an opinion or off-the-cuff remark; a statement is deliberate and often even prepared in advance.


3 ways to say how are you in french?

comment ça va? ça va? comment allez-vous?


How do you comment out a statement in Visual Basic?

There are 3 different ways to do this:Highlight then text, then press control + k and without letting go of control, press c.Put an apostrophe ( ' ) next to whatever you want commented out.Click file, then "Advanced," then choose Comment. This only works in visual studio 2010