Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------C Program---------------
- Introduction
- *C is a procedural programming language.
- *Developed by Dennis Ritchie (1972).
- *Mainly developed for an operating system.
- *C++ is nearly a superset of C language
- *There are few programs that may compile in C, but not in C++. Example : printf()
- How do we compile and run a C program?
- Refer the below link for brief answer.
- https://www.geeksforgeeks.org/compiling-a-c-program-behind-the-scenes/
- >>>>>>>>>>>>>>KEYWORDS<<<<<<<<<<<
- Keywords are predefined, reserved words used in programming that have special meanings to the compiler. Keywords are part of the syntax and they cannot be used as an identifier.
- Data Type --> int, char, float, double, unsigned, signed, long, short
- Flow Control --> if , else, for, while, do, switch, case, break, default, goto, continue
- Storage Classes --> Auto, Static, register, extern
- Memory Related --> Const, volatile,sizeof
- Userdifined Datatype --> struct, union, typedef, enum
- funtion Related --> void, return.
- Reference Link
- https://www.w3schools.in/c-tutorial/keywords/
- https://youtu.be/v5QPk5GV4Qw
- >>>>>>>>>>>IDENTIFIER<<<<<<<<<<<<<<<<
- Identifier refers to name given to entities such as variables, functions, structures etc.
- RULES FOR IDENTIFIERS
- >>An identifier can only have alphanumeric characters (a-z , A-Z , 0-9) (i.e. letters & digits) and underscore( _ ) symbol.
- >>Identifier names must be unique cannot be repeated.
- >>The first character must be an alphabet or underscore.
- >>You cannot use a keyword as identifiers.You cannot use int as an identifier because int is a keyword
- >>Only the first thirty-one (31) characters are significant.
- >>It must not contain white spaces.
- >>Identifiers are case-sensitive.
- Abc Valid
- Abc1 Valid
- 1Abc Invalid
- 1abc Invalid
- @Ab Invalid
- _abc valid
- _ Valid
- #sd invalid
- sd# invalid
- $as invalid
- as$ valid
- 122 invalid
- Reference >>
- https://www.w3schools.in/c-tutorial/identifiers/
- https://youtu.be/3LY60I3TExE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement