answersLogoWhite

0


Best Answer

Curly braces in the C Programming language is used to

  • Enclose a function(it may user defined also) .
  • Enclose a body of a segment (may be a set of statements ) and then it can be laelled.
User Avatar

Wiki User

โˆ™ 2009-11-15 13:39:45
This answer is:
User Avatar
Study guides
๐Ÿ““
See all Study Guides
โœ๏ธ
Create a Study Guide
4.18
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
11 Reviews

Add your answer:

Earn +20 pts
Q: What is the role of curly braces in a C program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Use of curly braces in C programming?

Lun mera..


How do you rectify braces expected error in c plus plus language?

This type of error indicates you've omitted braces where braces were expected. For instance, class declarations must be enclosed within curly braces, as must function definitions.


Is a left brace in a c program always followed by a right brace later in the program?

Yes. Braces are used to group similar pieces of code in a C program


How do you end a program in c?

All C programs have a main() function, and when the end of that is reached, the program terminates, so to end a program, just type the ending curly bracket '}' to match the opening one of the main() function. It is considered good practice to end a program with the statement 'return 0;' before the last curly bracket, to indicate that the program terminated normally.


What are its program components?

the main() function,the#include Directive, the variable definition. function prototype, program statements, the function definition,program comments and braces are the components of program in C++


What is function in C plus plus programming language?

a function is a code in braces to reduce the complexity of the program.


What is the purpose of the braces that surround the code in a C program?

{ Programming indicate start of a code or block or a segment and } indicate end of the same.


Why is curly bracket used in c plus plus?

Curly braces are used to mark the start and end of a statement, typically used when the statement body consists of two or more individual statements. However they are also used to mark the start and end of a class declaration and function bodies.


Why you use curly braces in C programming?

Only the designers Brian Kernighan and Dennis Ritchie can answer this question. But I would guess it was because of the handy notation on the drawing board to represent the concept of BEGIN and END.


What must an opening brace in a C plus plus program be?

An opening brace must be terminated with a closing brace in C++. Braces are used to enclose code blocks and initialiser lists.


How do you write c plus plus program?

Function-header, consisting of return type, name of function, parameter.Function-body, consisting of statements enclosed in curly braces {}.Simple example:#include /*Function-call*/void main(void) /*Function-header*/{printf("Hello world!"); /*Function-body and statements start here*/}


What is the role of void in functions of c?

this is a void main()int, char, are execution the program and it is not return the void.

People also asked