எங்கள் ஊழியர்களின் உதவியுடன் இந்த டொமைனில் ஆர்வமுள்ளவர்களுக்கு வழிகாட்டுதலையும் நாங்கள் வழங்குகிறோம். எனவே +91 7904189145 ஐ தொடர்பு கொள்ள மறுக்காதீர்கள்
- Energia software-version 1.8.7E21-windows
- cc33200 launch pad
- Jumper wire.
In this tutorial we are going to see how to print a
statement.using this we can also build resume and write a story too. Let us see
the program.
#include
<stdio.h>
int
main()
{
printf("Welcome to R2C
Technologies");
return 0;
}
v
All
valid C programs must contain the main() function. The code execution
begins from the start of the main() function.
v The printf is a library function to send formatted
output to the screen. The function prints the string inside quotations.
v To use printf in our program, we need to include
stdio.h header file using the #include
<stdio.h>statement.
v
The
return 0; statement inside the main() function is the "Exit status"
of the program.
Alternating Current (AC) flows one way, then the other way, continually reversing direction.
An AC voltage is continually changing between positive (+) and negative (-).
The rate of changing direction is called the frequency of the AC and it is measured in hertz (Hz) which is the number of forwards-backwards cycles per second.
Mains electricity has a frequency of 50Hz mostly but some countries maintain 60Hz also .The primary difference between 50 Hz (Hertz) and 60 Hz (Hertz) is simply that 60 Hz is 20% higher in frequency.Lower the frequency, speed of induction motor and generator will be lower. For example: With 50 Hz, generator will be running at 3,000 RPM against 3,600 RPM with 60 Hz.
See below for more details of signal properties.
An AC supply is suitable for powering some devices such as lamps and heaters but almost all electronic circuits require a steady DC supply (see below).
AC from a power supply
This shape is called a sine wave.
This triangular signal is AC because it changes
between positive (+) and negative (-).
Direct Current (DC) always flows in the same direction, but it may increase and decrease.
A DC voltage is always positive (or always negative), but it may increase and decrease.
Electronic circuits normally require a steady DC supply which is constant at one value or a smooth DC supply which has only a small variation called ripple.
Cells, batteries and regulated power supplies provide steady DC which is ideal for electronic circuits.
Power supplies contain a transformer which converts the mains AC supply to a safe low voltage AC. Then the AC is converted to DC by a bridge rectifier but the output is varying DC which is unsuitable for electronic circuits.
Some power supplies include a capacitor to provide smooth DC which is suitable for less-sensitive electronic circuits, including most of the projects on this website.
Lamps, heaters and motors will work with any DC supply.
Steady DC
from a battery or regulated power supply,
this is ideal for electronic circuits.
Smooth DC
from a smoothed power supply,
this is suitable for some electronics.
Varying DC
from a power supply without smoothing,
this is not suitable for electronics.
An operator is a symbol that
tells the compiler to perform specific mathematical or logical functions. C language
is rich in built-in operators and provides the following types
of operators − Arithmetic Operators.
Relational Operators. Logical Operators.
The following table shows all the arithmetic operators supported
by the C language. Assume variable A holds 10 and
variable B holds 20, then −
Operator |
Description |
Example |
+ |
Adds two operands. |
A + B = 30 |
− |
Subtracts second operand from the first. |
A − B = -10 |
* |
Multiplies both operands. |
A * B = 200 |
/ |
Divides numerator by de-numerator. |
B / A = 2 |
% |
Modulus Operator and remainder of after an integer
division. |
B % A = 0 |
Increment
and decrement operators
Increment and decrement operators are
unary operators that add or subtract one, to or from their
operand, respectively. They are commonly implemented in imperative programming
languages. ... The increment operator increases, and the decrement
operator decreases, the value of its operand by 1.
The following table
shows all the arithmetic operators supported by the C language. Assume
variable A holds 10 and variable B holds 20,
then
++ |
Increment operator increases the integer value by one. |
A++ = 11 |
-- |
Decrement operator decreases the integer value by one. |
A-- = 9 |
Assignment Operators
Assignment operators are
used to assigning value to a variable. The left side operand of the assignment
operator is a variable and right side operand of the assignment
operator is a value. This operator is used to assign the
value on the right to the variable on the left.
Operator |
Example |
Same as |
= |
a = b |
a = b |
+= |
a += b |
a = a+b |
-= |
a -= b |
a = a-b |
*= |
a *= b |
a = a*b |
/= |
a /= b |
a = a/b |
%= |
a %= b |
a = a%b |
C Relational Operators
A relational operator checks
the relationship between two operands. If the relation is
true, it returns 1; if the relation is false, it returns value
0. Relational operators are used in decision making and loops.
Operator |
Meaning
of Operator |
Example |
== |
Equal to |
5 == 3 is evaluated to 0 |
> |
Greater than |
5 > 3 is evaluated to 1 |
< |
Less than |
5 < 3 is evaluated to 0 |
!= |
Not equal to |
5 != 3 is evaluated to 1 |
>= |
Greater than or equal to |
5 >= 3 is evaluated to 1 |
<= |
Less than or equal to |
5 <= 3 is evaluated to 0 |
Logical operators
Operator |
Name |
Description |
&& |
Logical and |
Returns true if both
statements are true |
|| |
Logical or |
Returns true if one
of the statements is true |
! |
Logical not |
Reverse the result,
returns false if the result is true |
C Programming bitwise operators
Bitwise
operators are
special operator set provided by 'C. ' They are used in
bit level programming. These operators are used to manipulate
bits of an integer expression. Logical, shift and complement are three types
of bitwise operators.
Operators |
Meaning of operators |
& |
Bitwise AND |
| |
Bitwise OR |
^ |
Bitwise exclusive OR |
~ |
Bitwise complement |
<< |
Shift left |
>> |
Shift right |
Other Operators
Comma as an operator:
The comma operator
(represented by the token) is a binary operator that evaluates its first
operand and discards the result, it then evaluates the second operand and
returns this value (and type). The comma operator has the lowest precedence of
any C operator, and acts as a sequence point.
The sizeof operator
Sizeof is
a much used operator in the C or C++. It is
a compile time unary operator which can be used to compute the size of its
operand. The result of sizeof is of unsigned integral type which is usually
denoted by size_t. sizeof can be applied to any data-type, including primitive
types such as integer and floating-point types, pointer types, or compound
datatypes such as Structure, union etc.
Other operators such as
ternary operator ?:
, reference operator &
, dereference operator *
and member selection operator ->
will be discussed in later tutorials.
NALLAMUTHU GOUNDER MAHALINGAM COLLEGE POLLACHI-642001 ...