|
|
xiii | |
|
|
xv | |
Preface |
|
xvii | |
Acknowledgments |
|
xix | |
|
Part A Fundamentals of Computer |
|
|
|
1 Computer-History, Classification and Basic Anatomy |
|
|
1 | (13) |
|
1.1 Generations of Computer |
|
|
1 | (3) |
|
1.2 Classification of Computers |
|
|
4 | (4) |
|
1.3 Basic Anatomy of a Computer |
|
|
8 | (1) |
|
1.4 Von Neumann Architecture |
|
|
9 | (1) |
|
1.5 Memory Classification and Hierarchy |
|
|
10 | (1) |
|
1.6 Input and Output Devices |
|
|
10 | (4) |
|
2 Introduction to Number System and Logic Gates |
|
|
14 | (17) |
|
|
14 | (1) |
|
2.2 Base of a Number System |
|
|
14 | (1) |
|
2.3 Reason behind Using Binary Number System |
|
|
15 | (1) |
|
2.4 Conversion among Different Bases |
|
|
16 | (3) |
|
2.5 Similarities between Number Systems of Different Bases |
|
|
19 | (1) |
|
2.6 Addition of Two Numbers |
|
|
19 | (2) |
|
2.7 Signed Binary Numbers |
|
|
21 | (3) |
|
2.8 ASCII (American Standard Code for Information Interchange) |
|
|
24 | (1) |
|
2.9 Logic Gates and Boolean Algebra |
|
|
25 | (1) |
|
|
25 | (1) |
|
|
26 | (2) |
|
|
28 | (3) |
|
3 Introduction to System Software and Operating Systems |
|
|
31 | (9) |
|
3.1 Introduction to Assembler |
|
|
31 | (1) |
|
3.2 Introduction to Compiler |
|
|
32 | (2) |
|
3.3 Introduction to Operating System |
|
|
34 | (6) |
|
4 Algorithms and Flow Chart |
|
|
40 | (9) |
|
|
40 | (9) |
|
Part B Programming in `C' |
|
|
|
|
49 | (9) |
|
5.1 Generations of Programming Languages |
|
|
50 | (1) |
|
5.2 History of C Language |
|
|
51 | (1) |
|
|
52 | (1) |
|
5.4 Position of C in the Generations of Languages |
|
|
53 | (5) |
|
6 Constants, Variables and Data Types |
|
|
58 | (16) |
|
|
58 | (1) |
|
|
58 | (3) |
|
6.3 Keywords and Identifiers |
|
|
61 | (1) |
|
6.4 Variables and Data Types |
|
|
61 | (3) |
|
6.5 Storage Type Qualifier |
|
|
64 | (10) |
|
7 Operators and Expressions |
|
|
74 | (24) |
|
|
74 | (8) |
|
|
82 | (3) |
|
7.3 Precedence and Associativity |
|
|
85 | (13) |
|
8 Input and Output Statement |
|
|
98 | (34) |
|
8.1 Formatted I/O Functions |
|
|
98 | (10) |
|
8.2 Unformatted I/O Functions |
|
|
108 | (1) |
|
8.3 General Structure of a C Program |
|
|
109 | (1) |
|
|
110 | (1) |
|
8.5 Executing a C Program |
|
|
111 | (2) |
|
8.6 Executing from UNIX Environment |
|
|
113 | (1) |
|
|
113 | (2) |
|
|
115 | (17) |
|
|
132 | (39) |
|
|
132 | (11) |
|
|
143 | (1) |
|
|
144 | (4) |
|
|
148 | (1) |
|
|
148 | (23) |
|
|
171 | (53) |
|
|
172 | (5) |
|
|
177 | (1) |
|
|
178 | (1) |
|
|
179 | (6) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (2) |
|
|
189 | (1) |
|
|
190 | (1) |
|
|
191 | (1) |
|
10.11 Programming Examples |
|
|
191 | (33) |
|
|
224 | (44) |
|
|
224 | (1) |
|
11.2 Declaration of an Array |
|
|
224 | (1) |
|
|
225 | (3) |
|
11.4 Accessing Elements of an Array |
|
|
228 | (4) |
|
|
232 | (8) |
|
|
240 | (2) |
|
11.7 Two Dimensional Array |
|
|
242 | (3) |
|
11.8 Multidimensional Array |
|
|
245 | (2) |
|
11.9 Programming Examples |
|
|
247 | (21) |
|
|
268 | (52) |
|
|
268 | (5) |
|
12.2 Overcoming the Limitation with the Help of Scanset |
|
|
273 | (5) |
|
12.3 sscanf() and sprintf() Function |
|
|
278 | (2) |
|
12.4 Character Handling Functions |
|
|
280 | (9) |
|
12.5 String Handling Functions |
|
|
289 | (5) |
|
12.6 Two-Dimensional Array of Characters |
|
|
294 | (2) |
|
12.7 Programming Examples |
|
|
296 | (24) |
|
|
320 | (47) |
|
|
320 | (3) |
|
|
323 | (1) |
|
13.3 Types of Function Arguments |
|
|
324 | (2) |
|
13.4 Array as Function Argument |
|
|
326 | (2) |
|
|
328 | (3) |
|
13.6 Passing Multidimensional Array as Function Argument |
|
|
331 | (1) |
|
|
332 | (5) |
|
|
337 | (2) |
|
|
339 | (4) |
|
13.10 Advantage and Disadvantage of Recursion |
|
|
343 | (1) |
|
13.11 Implementation of Some Standard Library Functions |
|
|
343 | (2) |
|
13.12 Programming Examples |
|
|
345 | (22) |
|
|
367 | (49) |
|
|
367 | (4) |
|
|
371 | (1) |
|
|
372 | (3) |
|
|
375 | (1) |
|
14.5 Pointer and Function |
|
|
376 | (4) |
|
|
380 | (1) |
|
14.7 Function Returning Pointer |
|
|
381 | (2) |
|
14.8 Pointers and Multidimensional Arrays |
|
|
383 | (1) |
|
|
384 | (6) |
|
14.10 Dynamic Memory Allocation |
|
|
390 | (3) |
|
|
393 | (1) |
|
14.12 Returning a Two Dimensional Array from Function |
|
|
394 | (2) |
|
|
396 | (1) |
|
14.14 Implementation of Some Standard Library Functions |
|
|
397 | (2) |
|
14.15 Advantages of Pointer |
|
|
399 | (1) |
|
14.16 Interpreting Complicated Pointer Declarations |
|
|
400 | (1) |
|
14.17 Programming Examples |
|
|
401 | (15) |
|
|
416 | (45) |
|
|
416 | (2) |
|
15.2 Structure Initialization |
|
|
418 | (4) |
|
15.3 Arrays of Structures |
|
|
422 | (3) |
|
|
425 | (2) |
|
15.5 Structures and Functions |
|
|
427 | (1) |
|
15.6 Function Returning Structure |
|
|
428 | (3) |
|
15.7 Structures and Pointers |
|
|
431 | (3) |
|
|
434 | (8) |
|
15.9 Programming Examples |
|
|
442 | (19) |
|
|
461 | (46) |
|
|
461 | (1) |
|
|
462 | (2) |
|
16.3 Input-Output Operations on Files |
|
|
464 | (9) |
|
|
473 | (4) |
|
16.5 Command Line Arguments |
|
|
477 | (2) |
|
16.6 Programming Examples |
|
|
479 | (28) |
|
|
507 | (21) |
|
|
508 | (3) |
|
|
511 | (1) |
|
|
512 | (2) |
|
|
514 | (1) |
|
|
515 | (2) |
|
17.6 Right Shift Operator |
|
|
517 | (1) |
|
17.7 Programming Examples |
|
|
518 | (10) |
|
|
528 | (18) |
|
|
528 | (1) |
|
18.2 Macros with Arguments |
|
|
529 | (2) |
|
|
531 | (1) |
|
|
531 | (1) |
|
|
532 | (1) |
|
|
532 | (1) |
|
|
532 | (1) |
|
18.8 Conditional Compilation Directive |
|
|
533 | (3) |
|
18.9 Additional Directives |
|
|
536 | (1) |
|
|
537 | (1) |
|
18.11 Programming Examples |
|
|
538 | (8) |
|
|
546 | (35) |
|
|
547 | (1) |
|
19.2 Advantages of Linked List |
|
|
547 | (1) |
|
19.3 Types of Linked List |
|
|
547 | (1) |
|
19.4 Implementation of Singly Linked List |
|
|
548 | (2) |
|
19.5 Operations on Singly Linked List |
|
|
550 | (3) |
|
19.6 Inserting a New Element in a Linked List |
|
|
553 | (15) |
|
19.7 Applications of Singly Linked List |
|
|
568 | (4) |
|
19.8 Disadvantages of Linked List |
|
|
572 | (1) |
|
19.9 Programming Examples |
|
|
572 | (9) |
|
Part C Technical Questions for Interview |
|
|
|
|
581 | (5) |
|
Answer to Model Question Set-1 |
|
|
584 | (2) |
|
|
586 | (5) |
|
Answer to Model Question Set-2 |
|
|
589 | (2) |
|
|
591 | (5) |
|
Answer to Model Question Set-3 |
|
|
594 | (2) |
|
|
596 | (6) |
|
Answer to Model Question Set-4 |
|
|
599 | (3) |
|
|
602 | (5) |
|
Answer to Model Question Set-5 |
|
|
605 | (2) |
|
|
|
I Common Questions and Answers |
|
|
607 | (23) |
|
|
630 | (5) |
|
III Some Useful Library Functions |
|
|
635 | |