Posts

Showing posts from December, 2020

Data Types

Image
  Data Types In the declaration of every variables it is mandatory to specify it data type. It is representation of a data Classification  of data type Basically three types Primitive  Derived  User-defined  1.Primitive Data types:- It is subdivided into sub data types  Data we are storing with the help of the size of the data int char float void 2.Derived datatype:- Array String  Pointer  Functions 3.User-defined :- Stretcher  Union typedef enum The memory size of the basic data types may change according to 32 or 64-bit operating system. Let's see the basic data types.  Data Types Memory Size Range char 1 byte −128 to 127 signed char 1 byte −128 to 127 unsigned char 1 byte 0 to 255 short 2 byte −32,768 to 32,767 signed short 2 byte −32,768 to 32,767 unsigned short 2 byte 0 to 65,535 int 2 byte −32,768 to 32,767 signed int 2 byte −32,768 to 32,767 unsigned int 2 byte 0 to 65,535 short int 2 byte −32,768 to 32,767 signed short...

C Library and IDE

Image
  C Library:- C library is collection of header files. Every header file is collection  of related set of predefined functions Ex:-stdio.h   ,conio.h  ,string.h, math.h, graphics.h, dos.h Standard Header Files And Their Uses: #include<stdio.h>:  It is used to perform input and output operations using functions  scanf()  and  printf() . #include<iostream>:  It is used as a stream of Input and Output using cin and cout. #include<string.h>:  It is used to perform various functionalities related to string manupulation like strlen(), strcmp(), strcpy(), size(), etc. #include<math.h>:  It is used to perform mathematical operations like sqrt(), log2(), pow(), etc. #include<iomanip.h>:  It is used to access set() and setprecision() function to limit the decimal places in variables. #include<signal.h>:  It is used to perform signal handling functions like  signal() ...

Basic of c programming and Variables

  C Language Introduction         C  is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972 .  It was mainly developed as a system programming language to write an operating system.  The main features of C language include low-level access to memory, a simple set of keywords, and clean style, these features make C language suitable for system programmings like an operating system or compiler development. Many later languages have borrowed syntax/features directly or indirectly from C language.  Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on C language. C++ is nearly a super set of C language (There are few programs that may compile in C, but not in C++). Types of applications:- Standalone Applications Web Applications 1.Standalone Applications:- Must be installed (ex:- VLC player,ms- office,etc). Compatible for single -OS. 2. Web Applications:- No need install...

Error and type of error

Error   Errors are the problems or the faults that occur in the program, which makes the behavior of the program abnormal, and experienced developers can also make these faults.  Programming errors are also known as the bugs or faults, and the process of removing these bugs is known as  debugging . There are mainly five types of errors exist in C programming: Syntax error Run-time error Linker error Logical error Semantic error Syntax error:- Syntax errors are also known as the compilation errors as they occurred at the compilation time, or we can say that the syntax errors are thrown by the compilers.  These errors are mainly occurred due to the mistakes while typing or do not follow the syntax of the specified programming language.  These mistakes are generally made by beginners only because they are new to the language.  These errors can be easily debugged or corrected.   example:   If we want to declare the varia...