Skip to main content

Posts

Showing posts with the label C-language

C-LIBRARIES

The C programming language uses libraries as its primary method of extension. In C , a library is a set of functions contained within a single "archive " file . Each library typically has a header life , which contains the prototypes of the functions contained within the library that may be used by a program , and declarations of special data types and macro symbols used with these functions .               The most common C library is the C standard library , which is specified by  the ISO and ANSI C standards and comes functions with every C implementation.     Another common set of C library functions are those used by applications specifically targeted for Unix like systems , especially functions which provide an interface to the kernel.       Libraries are often written in C because C compilers generate efficient object code ; programmers then create interfaces to the li...

C-Operators

An operator is a symbol that operates on a certain data types and produce the output as the result of the operation. Category of Operators • Unary Operator An unary operator is an operator which operates on one operand that is it operates on itself.            Operand1 operator Here Operand1 may be a variable , a constant or an expression etc.    For example: -b , ~a , x+1 etc. • Binary Operator A binary operator is an operator which operates on two operands. Operand1 operator Operand2 Here Operand1 and Operand2 maybe a variable, a constant or an expression etc. and Operator must be either arithmetic type or relational type or logical type etc.    For example: a+b , a && b , etc. • Ternary Operator A ternary operator is an operator which operates on 3 operands. Operand1 o perator Operand2 operator Operand3   Here Operand1 , Operand 2 , Operand3 may be a variable ...

Data Types in C-Programming Language

A program usually contains differnt types of data elements and need to store the values being used in program. C-language has different data types for different types of data and can be broadly classified as : 1• Primary Data types 2• Secondary Data types Primary Data Types The primary data type is used for representing a single value only .It is also called simple or fundamental data type. As these are used at primary level in the high level language ,so these are called primary data type .Simple data types has some standard data types.     These are subdivided into 4 categories: 1• Integer data type 2• Floating point data type 3• Character data type 4• Void data type 1• Integer Data Types Generally and integer occupies 2Bytes memory space and its value range  Limited to - 32768 to + 32768 .A signed integer use 1 bit for storing sign and rest 15 bits for number. Range of an unsigned integer is from 0 to 65535 .T...

Lexicon of C programming language

This article introduces you to various components of C- language statements . C - Tokens are the essential part of  a C-compiler . A token is an individual entity of a C - program.C-statements having keywords , Identifiers , Constants , Strings , Operators and special symbols are called C-tokens. CHARACTER SET in C language includes alphabets (used to write C -statements and character constans) ,  digits   (used to assign numeric data) , special symbols (used for special purposes such as to create relational statements and assignment statements). There are 30 spec ial symbols like <,>,<=,>=,== and many others and at last are white spaces . KEYWORDS and IDENTIFIERS   Every word in C - language is a keyword or an identifier. Keywords cannot be used as a variable name , these are reserved words. For example: auto , break , case , else , struct  etc. While Identifiers refer to name of user-defined variables , arrays , functions (we wi...

Introduction to Programming language C

Dennis Ritchie ( US) designed C programming language in 1972 at "AT & T's Bell laboratories". C has been often termed as " M iddle Leve l Language " . Programs written in C are very efficient and fast. C is a general purpose structured powerful language. Features at a Glance: • C is highly portable language .This means that a C program written for one system can be run on another system with little or no modifications. • C's another striking feature is its ability to extend itself. We can add our own functions to the C library . • Writing a C program with user defined makes program more simple and easy to understand . • C - language has more data types ( except boolean operators ), operators and can take more variables than other languages. • C - language is a structured programming language that is  it has different modules and blocks . • C - language is used to develop graphics software . 2D and 3D graphics are also implement...