×
Don’t stop when you’re tired. STOP when you are DONE.
--Your friends at LectureNotes
Close

Note for C Language - C By Asif Syed

  • C Language - C
  • Note
  • Mdu rohtak - Mdu
  • 2 Topics
  • 149 Views
  • 6 Offline Downloads
  • Uploaded 9 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Mewat Engineering College FUNDAMENTALS OF COMPUTER & PROGRAMMING IN ‘C’ [CSE-101-F] LECTURE NOTES -CUMQUESTION BANK PREPARED BY SHAHNAWAZ AHMAD DEPARTMENT OF COMPUTER SCIENCE & ENGINNERING

Text from page-2

CSE-101-F (Fundamentals of Computer & Programming in ‘C’) Contents SYLLABUS ......................................................................................................................................................... 3 EVALUATION OF COMPUTERS ................................................................................................................... 4 GENERATION & DESCRIPTION ............................................................................................................... 4 DEFINITION ....................................................................................................................................................... 5 DATA............................................................................................................................................................... 5 PROCESSING ............................................................................................................................................ 6 TYPES OF COMPUTER ................................................................................................................................... 6 PC (Personal Computer) ................................................................................................................................. 6 Workstation ................................................................................................................................................. 6 HARDWARE ORGANIZATION OF COMPUTER ....................................................................................... 9 Objectives ........................................................................................................................................................ 9 Input Device ................................................................................................................................................ 9 INTRODUCTION TO MICROPROCESSOR................................................................................................11 ARCHITECTURE OF MICROPROCESSOR ...........................................................................................12 MICROPROCESSOR ADVANTAGES & DISADVANTAGES ........................................................13 COMMONLY USED CPUS, INPUT/OUTPUT DEVICES..........................................................................19 Introduction to CPU ......................................................................................................................................19 Component of CPU ...................................................................................................................................20 INPUT/OUTPUT PORT ...................................................................................................................................29 INPUT/OUTPUT CONNECTORS .............................................................................................................32 INTRODUCTION TO OPERATING SYSTEM ............................................................................................32 TYPES OF OPERATING SYSTEMS.........................................................................................................34 FUNCTIONS OF OPERATING SYSTEM ............................................................................................38 SECTION B .......................................................................................................................................................53 BASIC INTRODUCTION TO SYSTEM SOFTWARE AND PROGRAMS ..............................................53 LOW LEVEL LANGUAGE ........................................................................................................................56 ASSEMBLY LANGUAGE......................................................................................................................57 INTRODUCTION TO COMPUTER NETWORKS ......................................................................................65 Types of Networking ....................................................................................................................................66 PREPARED BY- SHAHNAWAZ AHMAD Page 1

Text from page-3

CSE-101-F (Fundamentals of Computer & Programming in ‘C’) Introduction to Data Communication ......................................................................................................68 OSI REFERENCE MODEL .............................................................................................................................77 INTRODUCTION TO INTERNET, PROTOCOLS & BACKBONE NETWORK ....................................80 Introduction to Backbone Network ..................................................................................................................88 TCP/IP REFERENCE MODEL .......................................................................................................................88 HYPERTEXT DOCUMENTS, HTTP, DNS, NETWORK SECURITY ......................................................91 Introduction to DNS ..........................................................................................................................................93 SECTION C .......................................................................................................................................................99 An Overview of C .............................................................................................................................................99 Introduction to C ...........................................................................................................................................99 Introduction to Constants........................................................................................................................101 Introduction to Variables ........................................................................................................................102 SECTION D.....................................................................................................................................................139 INTRODUCTION TO POINTERS ...............................................................................................................139 INTRODUCTION TO DYNAMIC MEMORY ALLOCATION................................................................146 Various Functions for purpose of Memory Management.........................................................................146 INTRODUCTION TO FILE MANAGEMENT ...........................................................................................150 File Operation Functions in C ....................................................................................................................151 Memory Management in C .....................................................................................................................151 Question Bank (Long Question)...............................................................................................................160 Question Bank (Short Question)...............................................................................................................320 PREPARED BY- SHAHNAWAZ AHMAD Page 2

Text from page-4

CSE-101-F (Fundamentals of Computer & Programming in ‘C’) SYLLABUS CSE-101-F Fundamentals of Computers & Programming in C L T P Class Work : 50 Marks 3 1 0 Exam : 100 Marks Total : 150 Marks Duration of Exam : 3 Hours NOTE-Examiner will set 9 questions in total, with two questions from each section and one question covering all sectionswhich will be Q.1. This Q.1 is compulsory and of short answer type. Each question carries equal mark (20 marks).Students have to attempt 5 questions in total. SECTION A An Overview of Computer System and Operating Systems: Fundamentals: - Evaluation of computers, Hardware organization of a computer, Introduction to microprocessor, generations of microprocessors, commonly used CPUs, Input/Output devices, Input/Output ports and connectors. Operating System Basics: Introduction to Operating system, Functions of Operating Systems, Classification of Operating Systems, Basic introduction to DOS, UNIX/LINUX OS, Windows XP. SECTION B Basic Introduction to System Software and Programs:Machine Language, Assembly Languages, Low level languages, High level Languages, Types of high level languages, Compiler, Interpreter, Assembler, Loader, Linker, Relationship between Compiler, Interpreter, Loader and Linker. Basic Introduction to Computer Networks:Data Communication, modulation, Network devices, LAN, LAN topologies, WAN, OSI Reference model, Introduction to Internet and protocols: TCP/IP Reference model, Backbone network, Network connecting devices, Hypertext documents, HTTP, DNS, Network Security. SECTION C An Overview of C: Constants, Variables and Data types, operators and Expressions, managing I/O operations, Decision Making and branching, Decision Making and looping, Arrays, Character Arrays and Strings, User Defined Functions. Structure and Union in C: Defining structure, declaring variables, Accessing structure members, structure initialization, copying and comparing structures variables, operations on individual members, Array of structure, structure with structure, unions, size of structure. SECTION D Pointers in C: Introduction, Understanding Pointers, Accessing the address of a variable, Declaring Pointer Variables, Initialization of Pointer Variables, Accessing a variable through its pointer, Chain of Pointers, Pointer Expressions, Pointer Increments and Scale Factors, pointers and Arrays, Pointer and Character Strings, Arrays of Pointers, Pointers as Function Arguments, Functions Returning Pointers, Pointers to Functions. Dynamic Memory Allocation and File Management in C:Introduction, Dynamic memory allocation, allocating a block of memory: Malloc, allocating multiple blocks of memory: Calloc. Releasing the used space: Free, Altering the size of block: Realloc, Defining and opening file, closing file, I/O operation on files, error handling during I/O operations, Random Access to files and command line arguments. PREPARED BY- SHAHNAWAZ AHMAD Page 3

Lecture Notes