How to use the multiline comment in C?

Query By: JULI SINGH

A

Amit Singh

Multiline comment in C

In C programming, the multiline comment can be used in two ways...

  • As a single-line comment
  • As a multiline comment

To use multiline comment just you have to put all code between /* and */ symbols, either it is in a single-line or in multiline. For example

/* this is a multiline comment in a single line */

printf("Hello word");

Output

Hello word

---------------- As multiline --------------

int a=20, b=30, c=0

/* c=a+b

printf("sum=%d",c); */

c=b-a

printf("Sub=%d",c);

Output

Sub=10

I hope it is helpfull ?????????

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)