C Language Archive

Scanf and Address Operator in C

scanf(): C library is a Collection of Header files. Header file contains Variables and Functions. printf() and scanf() functions belongs to stdio.h header file. Printf() function is used to display the information on Monitor(standard output). …

sizeof in C

sizeof(): It is library function. It is used to find the size of Variable Data type Expression Array String Structure Pointer …… Sizeof() function returns the size in integer form. Finding size using variable: We …

limits.h in C

limits.h: It is pre-defined header file. This header file contains set of variables INT_MIN INT_MAX UINT_MIN SHRT_MIN SHRT_MAX USHART_MAX SCHAR_MIN SCHAR_MAX UCHAR_MAX These variables holding some values. These variables represent the minimum and maximum limits …

C programs on Char type

What happens when we try to store the value beyond the limits of datatype? Every variable can store the value within the limits only. When limit exceeded, it counts the value in the specified limit …

integer types in c

Finding the limits of short integer type: One of the integer types in short It occupies 2 bytes memory. Limits.h header file is providing variables to find the limits of short type. %u specifier: A …

C codes on Integer types

Note: When we don’t specify the variable is either signed or unsigned, by default it is signed type.

Float data type in C

Float types: A floating point type variable is a variable that can hold a real number, such as 4.0, 2.5, 3.33, or 0.1226. There are three different floating point data types: float, double, and long double. A float …

Number System Conversions

Number System(Decimal, Binary, Octal, Hexadecimal) Decimal Numeral System (Base-10):             Our number system, the decimal system, uses ten symbols. Therefore, decimal is said to be Base Ten. These are the regular numbers that we use. Example: …

1’s and 2’s complements in C

1’s and 2’s complement of the binary numbers(positive and negative): Property: Two’s complement representation allows the use of binary arithmetic operations on signed integers, yielding the correct 2’s complement results. Positive Numbers: Positive 2’s complement …

Operators in C

Operators: Operator is a symbol Operator performs an operation on operands Expression is a collection of Operators and Operands. Operators classified into: Unary: Performs operation on Single operand. Binary: Performs operation on 2 operands. Ternary: …

Courses Enquiry Form