The document discusses various concepts in C programming including:
1. Low level vs high level languages, data types, operators, control structures like if/else and loops, functions, arrays, pointers, structures, unions, and file handling.
2. C was developed in the early 1970s by Ken Thompson at Bell Labs. It is a middle-level language as it supports high-level constructs while being compiled to low-level machine instructions.
3. Key features of C include portability, efficiency, flexibility, and ability to interface with assembly language.
The document discusses various concepts in C programming including:
1. Low level vs high level languages, data types, operators, control structures like if/else and loops, functions, arrays, pointers, structures, unions, and file handling.
2. C was developed in the early 1970s by Ken Thompson at Bell Labs. It is a middle-level language as it supports high-level constructs while being compiled to low-level machine instructions.
3. Key features of C include portability, efficiency, flexibility, and ability to interface with assembly language.
The document discusses various concepts in C programming including:
1. Low level vs high level languages, data types, operators, control structures like if/else and loops, functions, arrays, pointers, structures, unions, and file handling.
2. C was developed in the early 1970s by Ken Thompson at Bell Labs. It is a middle-level language as it supports high-level constructs while being compiled to low-level machine instructions.
3. Key features of C include portability, efficiency, flexibility, and ability to interface with assembly language.
1. Low level language vs. high level language 2. Procedural Language 3. Strongly Typed vs. Weakly Typed Language 4. Algorithms and flowchart 5. C tokens 6. Literals 7. Variables and Constants 8. Keywords 9. Escape sequence characters 10. Data types : int, float, char, long, double, short int , along with amount of memory requirement for each. 11. Specifiers - %d, %f, %lf, %ld, %c, %s, %x 12. Relational Operators 13. Logical Operators 14. Conditional Operators 15. Precedence of operators 16. Conditions in C : if, if… else, switch case 17. Loops in C : while, for, do while 18. Storage classes in C: Auto, register, static and extern. 19. Array --- Memory diagram of an integer and float array 20. 2-D array, n-D array --- Memory diagram 21. Pointers 22. Pointers and array --- notations like *(arr + i) etc 23. Functions – library functions and user – defined functions 24. Pass by value vs. Pass by reference 25. Return values from a function 26. Header files 27. C pre-processor directives 28. Main function 29. Data type: void 30. Macros in C 31. Strings. 32. String terminator. 33. String library functions. 34. Purpose of functions gets, puts, getch, getche, putchar etc. 35. Structure 36. Self – referential structure 37. Array of structure and array within structure. 38. Nested structure 39. Pointer to structure 40. Enum – enumerated data type 41. Union 42. FILE pointer 43. Modes to open a file. 44. Purpose of file handling functions – fscanf, fprintf, fgetc, fputc, fgets, fputs, fopen, fclose 45. EOF
II. State the characteristic features of C.
III. Where was C developed and by whom? IV. What is a compiler? V. C is called a middle level language. Give reasons. VI. State two low level and two high level features of C. VII. What are the three parts of a for-loop? VIII. Differentiate between while and do-while loop (entry controlled and exit controlled loop). IX. What type of ‘if… else’ conditions cannot be implemented with switch case? Justify. X. Why is ‘break’ included in a ‘switch case’ construct? XI. What is the purpose of default keyword in a switch case? XII. State differences between break and continue keyword with example. XIII. How can you implement an infinite loop using the following loops? a. while loop b. do-while loop c. for loop XIV. Give example of a ‘for loop’ that has multiple initialisation, multiple increments and compound terminal conditions. Explain how it works. XV. Explain the concepts of actual and formal arguments in a function. XVI. What do you understand by user defined data type? XVII. Differentiate between array and structure. XVIII. Differentiate between union and structure. XIX. Difference between getch and getche.
Note: Also solve problems on detecting errors in codes and determining outputs