What are variables and keywords in c++Abdul Hafeez
Hi I am Abdul Hafeez ,I made this videos for Beginner and intermediate students, they can easily understand basic structure of c++ programming.
In this lecture students can understand easily:
* what is variables in c++ Programming?
* variables and data types in c++ Programming
* how to declare variables in c++ Programming
* how to initialize variables in c++ Programming
* keywords in c programming
* keywords in c++ programming
* variables and data types in c++ Programming
* size of data types in c++ Programming
* range of data types in c++ programming
* how are variables stored in memory?
C++ tutorials in URDU - HINDI
Basic concepts and advance concepts
What are variables and keywords in c++Abdul Hafeez
Hi I am Abdul Hafeez ,I made this videos for Beginner and intermediate students, they can easily understand basic structure of c++ programming.
In this lecture students can understand easily:
* what is variables in c++ Programming?
* variables and data types in c++ Programming
* how to declare variables in c++ Programming
* how to initialize variables in c++ Programming
* keywords in c programming
* keywords in c++ programming
* variables and data types in c++ Programming
* size of data types in c++ Programming
* range of data types in c++ programming
* how are variables stored in memory?
C++ tutorials in URDU - HINDI
Basic concepts and advance concepts
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
Our Vision & Mission – Simplifying Students Life
Our Belief – “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom
● Introduction to components of a Computer System
● Introduction to Algorithm and Flowchart
● Keywords, Identifiers, Constants and Variables
● Data types in C
● Operators in C
● Basic Input and Output Operations
● Expressions and Precedence of Operators
● In-built Functions
Overview:
C is a general-purpose computer programming language created in the 1970s by Dennis Ritchie.
It remains widely used and influential due to its clean reflection of CPU capabilities.
Originally developed at Bell Labs, it was applied to re-implement the kernel of the Unix operating system.
C is commonly used on computer architectures ranging from the largest supercomputers to the smallest microcontrollers and embedded systems.
Features and Characteristics:
Imperative Procedural Language: C follows a procedural paradigm, emphasizing step-by-step instructions.
Structured Programming: Programs are divided into modules, making testing, maintenance, and debugging easier.
Low-Level Access to Memory: C provides direct memory manipulation.
Static Type System: Type checking is done at compile time.
Recursion Support: Functions can call themselves.
Cross-Platform Capability: C compilers are available for various architectures and operating systems.
Applications:
Operating Systems: C is widely used in OS development.
Device Drivers: C is essential for hardware interaction.
Protocol Stacks: Networking protocols are often implemented in C.
Embedded Systems: C is popular for microcontrollers and firmware.
Utilities and Tools: Many system utilities are written in C.
History:
ALGOL: The base language for C, introduced in 1960.
BCPL: Developed in 1967 for system software.
B: Created by Ken Thompson in 1970, influenced by BCPL.
C: Developed by Dennis Ritchie in 1972, combining features from ALGOL, BCPL, and B.
Standardization: ANSI and ISO standardized C in 1989.
Example “Hello, World!” Program:
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
}
This simple program prints “Hello, World!” to the screen using the printf() function from the standard input-output library.
Remember, C’s legacy extends beyond application software, making it a foundational language for understanding programming concepts and system-level development.C is a general-purpose programming language that was developed in the early 1970s by Dennis Ritchie at Bell Laboratories. It is known for its efficiency and is widely used for system programming, including developing operating systems like UNIX. C is a procedural language, which means it follows a set of instructions step by step to perform a task. It allows low-level access to memory and provides a clean and simple syntax, making it a fundamental language in the field of computer science.These tags cover various aspects of C programming, from its use in system programming and embedded systems to its importance in learning coding fundamentals. Feel free to use these tags on social media platforms, blog posts, or other content related to C programming!
This PPT is all about INTRODUCTION TO C LANGUAGE in which all basic topics are covered and the information present in this is refered from a book called "Let Us C" by YASHAVANT KANETKAR i.e. This PPT is having all important points of first chapter of "Let Us C". If any doubt plz ask us in comment.
1. Getting Started
What you’ll learn:
1. Basic Structure of a C
Program
2. Basic Syntax of C language
3. Data Types
4. Defining Variables and
Constants
5. Console I/O
3. Basic Structure
A C program basically consists of the following parts:
Pre-processor Commands
Functions
Variables
Statements & Expressions
Comments
7. Keywords
32 Keywords from C89
auto double int struct break else long switch
case enum register typedef char extern return union
const float short unsigned continue for signed void
default goto sizeof volatile do if static while
5 Keywords from C99
_Bool _Imaginary
restrict _Complex
inline
6 Keywords from C11
_Alignas _Atomic
_Noreturn _Alignof
_Generic _Static_assert
8. Identifiers
Rules for defining Identifiers
It can only contain letters, digits, or an underscore.
It should not start with a digit. It can start with a letter or an underscore.
A keyword should not be used as an identifier.
Since C is a case sensitive language so uppercase letters differ from lowercase ones.
Apple apple
9. Valid and Invalid Identifiers
Valid Identifiers:-
VarName VAR2NAME _var11 var_name_11 int_100
Invalid identifiers:-
var-name 11varname int var name $var_name
10. Literals
Literals are also called constants. We have following type of constants:
Integer constant 1, -11, 0xC, 010
Floating constant -32.56, 0.9787
Character constant ‘a’, ‘1’, ‘#’
11. Strings
String literal is a sequence of characters.
E.g. “Hello”
It is terminated by ‘0’.
E.g. “Hello” will be represented as “Hello0” in memory.
16. For integer types
MODIFIERS SIZE RANGE
Int 4 bytes -2147483648 to 2147483647
Unsigned int 4 bytes 0 to 4294967295
Signed int 4 bytes -2147483648 to 2147483647
Short int 2 bytes -32768 to 32767
Unsigned short int 2 bytes 0 to 65535
Signed short int 2 bytes -32768 to 32767
Long int 4 bytes -2147483648 to 2147483647
Signed long int 4 bytes -2147483648 to 2147483647
Unsigned long int 4 bytes 0 to 4294967295
17. For floating types
MODIFIERS SIZE RANGE
Float 4 bytes -3.4e-38
to +3.4e+38
Double 8 bytes -1.7e-308
to +1.7e+308
Long double 8 bytes -1.7e-308
to +1.7e+308
18. For character types
MODIFIERS SIZE RANGE
Char 1 byte 0 to 255
Unsigned char 1 byte 0 to 255
Signed char 1 byte -128 to +127
20. Variables
It refers to a storage location in the memory space whose value can be manipulated.
int a = 10;
a = 20;
10
20
value at
memory
location
data type
identifier
value
of the
variable
value
changed
21. Constants
It refers to a storage location in the memory space whose value is fixed.
const int a = 10;
a = 20;
10
10
value at
memory
location
data type
identifier
value
of the
variable
value
can’t be
changed
keyword