C Notes
C Notes
syntax /* codigo */
example /*******************************************************
***
Pablo Maldonado
Practice 1.1
C fundamentals
********************************************************
**/
syntax int
main(void)
{
statements;
return EXIT_SUCCESS;
}
example int
main(void)
{
printf("Hello, world!\n");
return EXIT_SUCCESS;
}
syntax
scanf( format string, list of &variables);
example int n;
printf(" Enter the number :");
scanf("%d", &n);
Adds two
+ Plus a+b
numeric values.
Subtracts right
– Minus operand from a–b
left operand.
Multiply two
* Multiply a*b
numeric values.
Divide two
/ Divide a/b
numeric values.
Returns the
remainder after
% Modulus diving the left a%b
operand with the
right operand.
Used to specify
+ Unary Plus the positive +a
values.
Decreases the
-- Decrement value of the a--
operand by 1.
Subtract the
right operand
Minus and and left operand a -= b
-=
assign and assign this a=a-b
value to the left
operand.
Multiply the right
operand and left
Multiply and operand and a *= b
*=
assign assign this value a= a*b
to the left
operand.
Assign the
remainder in the
Modulus and division of left
%= a%
assign operand with the
right operand to
the left operand.
Ref. :
● The University of Utah.
● Geeksforgeeks.