0% found this document useful (0 votes)
3 views2 pages

First

C is a procedural programming language that does not support object-oriented programming. It includes basic libraries for input/output, string manipulation, and file handling, with a main function that can accept arguments. Data types in C include primitive types like int and char, as well as structures and pointers for more complex data management.

Uploaded by

babbba48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

First

C is a procedural programming language that does not support object-oriented programming. It includes basic libraries for input/output, string manipulation, and file handling, with a main function that can accept arguments. Data types in C include primitive types like int and char, as well as structures and pointers for more complex data management.

Uploaded by

babbba48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

C language is procedural Language ( doesn't not support OOP)

Basic libraries in C:

headers:
stdin.h >>> standard input ouput

string.h>>> string maniuplation

ctype.h >>> comparsion and conversion (uppr, lowr,isalpha)

stdlib.h>>> for File handling

main:
in C language main function is the function called when running the program

it can have arguments or void

conventional arguments names are as follow:


int argc >> for number of arguments (always 1 if no arugemnts)

char *argv[] >> for arguments vector

data Types:

const >>> can not be changed

prmitive:
int 32 bit 4byte
long 64 bit 8 byte
char 8 bit 1 byte
bool (needs <stdbool.h>
double (64 bit percision)
float (32 bit)

structure:
array: in C array uses the curely braces {} for initialising the array

int a[] ={1,2,3,4,5};

pointers:
1-stores address of variables of same type

int a =10;
int *b = &a;

2-it is used to store literal-strings in (ROM)

char *name = "Abdullah"


functions:
a block of code written to be used many time.

struct:
structs enable you to create your own data type
imagine you want to create a cat data type( similar to objects in
other languages)

typdef struct {
char *color;
char *name;
int age;
}cat ;

(typdef here lets call the whole struct as cat);

modified:
short int -32768 -> 32768
unsigned short 0 -> 65635

long int -2,1247,483,648 -> 2,1247,483,648

unsigned int 0 -> 4,249,967,295

long long 64 bit

You might also like