0

The } & {

what are these brackets used for?

14th May 2018, 7:49 AM
Ariel
5 Respuestas
+ 1
hi, these are the parenthesis symbols or this is used where a function starts after declaration such as, for example void main() { // beginning of a function or a class } // ending of a function or class without these a function cannot be used within a programming language. ! HAPPY CODDING !
14th May 2018, 8:21 AM
Rajeeb
+ 4
These brackets indicate the beginning and termination of program Ariel
14th May 2018, 8:11 AM
Priyanka Thakur
Priyanka Thakur - avatar
+ 2
{ and } define the start and end of a block of code . in c like languages (c,c++,c#,java.....) we have expressions (an expression is a line of code that ends with a semicolon ; ) . a number of expressions that are enclosed within { } are called a block . the defines a scope for variables which means that the variables declared within a block are only available within that block while variables declared out of the block can be used inside of it. also the block defines the beginning and end of a method or a class in the same way
14th May 2018, 9:41 AM
Rabee Abbas
Rabee Abbas - avatar
0
thank you very much!
14th May 2018, 9:47 AM
Ariel
0
but when do I use them?
14th May 2018, 10:27 AM
Ariel