C and Cpp by SBE

C and Cpp by SBE

Share

This page contains videos and topics related to
C and C++.

17/05/2022

core java
for
duration:20 hours fees : 2000
at ComputerEdu/SaiBalaji Edu
Dilsukhnagar hyderabad

Sai Balaji Education

DemoRegistration | Sai Balaji Education 24/03/2021

INTRODUCING COURSES WITH NEW DURATION AND FEES
LEARN ANY COURSE IN 10 DAYS/20 HOURS DURATION
 C
 C++
 CORE JAVA
 C # DOTNET
 CORE PYTHON
 MS OFFICE
 HTML
 CSS
 SqlServer
 Oracle

https://hjlinks.page.link/DemoRegistration

, , , ,
, , , , ,
, , , , ,
, , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , , , ,

DemoRegistration | Sai Balaji Education

04/08/2020

History of C

• C programming language was developed in 1972 by Dennis Ritchie at bell laboratories of AT&T (American Telephone & Telegraph), located in U.S.A.
• C is a simple and structure oriented programming language.
• Dennis Ritchie is known as the founder of c language.
• In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication of The C Programming Language by Kernighan & Ritchie caused a revolution in the computing world.
• C is also called mother Language of all programming Language.
• It is the most widely use computer programming language, This language is used for develop system software and Operating System.
• All other programming languages were derived directly or indirectly from C programming concepts.
• It was developed to overcome the problems of previous languages such as B, BCPL etc.
• Initially, C language was developed to be used in UNIX operating system.
• It inherits many features of previous languages such as B and BCPL.

Where we use C Language
• C is a computer programming language mainly used for;
• Design Operating system
• Design Language Compiler
• Design Database
• Assemblers



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

Printf Scanf

• printf() and scanf() functions are inbuilt library functions in C programming language
• These are available in C library by default.
• These functions are defined in “stdio.h” which is a header file in C language
• We have to include “stdio.h” file to make use of these printf() and scanf() library functions in C language.

printf() function in C language:
• In C programming language, printf() function is used to print the “character, string, float, integer, octal and hexadecimal values” onto the output screen.
• We use printf() function with %d format specifier to display the value of an integer variable.
• Similarly %c is used to display character, %f for float variable, %s for string variable, %lf for double and %x for hexadecimal variable.
• To generate a newline,we use “\n” in C printf() statement.
scanf() function in C language:
• In C programming language, scanf() function is used to read character, string, numeric data from keyboard
KEY POINTS TO REMEMBER IN C PRINTF() AND SCANF():
1. printf() is used to display the output and scanf() is used to read the inputs.
2. printf() and scanf() functions are declared in “stdio.h” header file in C library.
3. All syntax in C language including printf() and scanf() functions are case sensitive.



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

C OPERATORS
• The symbols which are used to perform logical and mathematical operations in a C program are called C operators.
• Operators, functions, constants and variables are combined together to form expressions.
• Consider the expression A + B * 5. where, +, * are operators, A, B are variables, 5 is constant and A + B * 5 is an expression.
TYPES OF C OPERATORS:
C language offers many types of operators. They are,
1. Arithmetic operators
2. Assignment operators
3. Relational operators
4. Logical operators
5. Bit wise operators
6. Conditional operators (ternary operators)
7. Increment/decrement operators
8. Special operators



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

Recursion in c
• When function is called within the same function, it is known as recursion in C. The function which calls the same function, is known as recursive function.
• In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function.
• Thus function that calls itself is known as a recursive function. And, this technique is known as recursion.



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

functions in C
The function in C language is also known as procedure or subroutine in other programming languages.
To perform any task, we can create function. A function can be called many times. It provides modularity and code reusability.



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

C Array

• C Array is a collection of variables belongings to the same data type. You can store group of data of same data type in an array.
• An array is a collection of data that holds fixed number of values of same type. For example: if you want to store marks of 100 students, you can create an array for it.
The size and type of arrays cannot be changed after its declaration.
How to declare an array in C?
data_type array_name[array_size];
For example,
float mark[5];
Here, we declared an array, mark, of floating-point type and size 5. Meaning, it can hold 5 floating-point values.
ELEMENTS OF AN ARRAY AND HOW TO ACCESS THEM?
You can access elements of an array by indices.



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

C Pointers

• Pointers in C language is a variable that stores/points the address of another variable.
• A Pointer in C is used to allocate memory dynamically i.e. at run time.
• The pointer variable might be belonging to any of the data type such as int, float, char, double, short etc.
Pointer Syntax : data_type *var_name; Example : int *p; char *p;
Where, * is used to denote that “p” is pointer variable and not a normal variable.



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

04/08/2020

Dynamic memory allocation in C:
The process of allocating memory during program ex*****on is called dynamic memory allocation.
DYNAMIC MEMORY ALLOCATION FUNCTIONS IN C:
C language offers 4 dynamic memory allocation functions. These functions can be found in the header file. They are,
1. malloc()
2. calloc()
3. realloc()
4. free()



SBEC
SBEC
SBEC

, & Update Your Skills from Home

, , ,
, , ,
, , , ,

, , , , , , , , , , , , , , , , , , , , , , , , ,

Want your school to be the top-listed School/college in Hyderabad?

Click here to claim your Sponsored Listing.

Location

Category

Address


Hyderabad
500060