Advertisement
Mukezh

C Program Session 1

Nov 20th, 2020 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.03 KB | None | 0 0
  1. ----------C Program---------------
  2.  
  3. Introduction
  4. *C is a procedural programming language.
  5. *Developed by Dennis Ritchie (1972).
  6. *Mainly developed for an operating system.
  7. *C++ is nearly a superset of C language
  8. *There are few programs that may compile in C, but not in C++. Example : printf()
  9.  
  10. How do we compile and run a C program?
  11.   Refer the below link for brief answer.
  12.  https://www.geeksforgeeks.org/compiling-a-c-program-behind-the-scenes/
  13.  
  14. >>>>>>>>>>>>>>KEYWORDS<<<<<<<<<<<
  15. 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.
  16.  
  17. Data Type --> int, char, float, double, unsigned, signed, long, short
  18. Flow Control --> if , else, for, while, do, switch, case, break, default, goto, continue
  19. Storage Classes --> Auto, Static, register, extern
  20. Memory Related --> Const, volatile,sizeof  
  21. Userdifined Datatype -->  struct, union, typedef, enum
  22. funtion Related --> void, return.  
  23.  
  24. Reference Link
  25. https://www.w3schools.in/c-tutorial/keywords/  
  26. https://youtu.be/v5QPk5GV4Qw
  27.  
  28. >>>>>>>>>>>IDENTIFIER<<<<<<<<<<<<<<<<
  29. Identifier refers to name given to entities such as variables, functions, structures etc.
  30.  
  31.   RULES FOR IDENTIFIERS
  32. >>An identifier can only have alphanumeric characters (a-z , A-Z , 0-9) (i.e. letters & digits) and underscore( _ ) symbol.
  33. >>Identifier names must be unique cannot be repeated.
  34. >>The first character must be an alphabet or underscore.
  35. >>You cannot use a keyword as identifiers.You cannot use int as an identifier because int is a keyword
  36. >>Only the first thirty-one (31) characters are significant.
  37. >>It must not contain white spaces.
  38. >>Identifiers are case-sensitive.
  39.    
  40.   Abc   Valid
  41.   Abc1  Valid
  42.   1Abc  Invalid
  43.   1abc  Invalid
  44.   @Ab    Invalid
  45.   _abc    valid
  46.   _      Valid
  47.   #sd    invalid
  48.   sd#    invalid
  49.   $as    invalid
  50.   as$     valid
  51.   122    invalid
  52.  
  53.  
  54.   Reference >>
  55.   https://www.w3schools.in/c-tutorial/identifiers/
  56.   https://youtu.be/3LY60I3TExE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement