Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

DECLARATION

I AMAR [ 4HG21CS004 ] student of 3rd semester B.E, CS&E, Government Engineering


College, here by declare that the internship entitled “Fundamentals of C Program-
ming Language and MS Office ” has been carried out by me, under the supervision
of Dr RAGHU M E faculty, Dept of CSE, submitted in partial fulfilment of the re-
quirements for the award of the degree of Computer Science and Engineering by the
Visvesvaraya Technological University during the academic year 2022-23. This report
has not been submitted to any other organization/university for any award of degree
certificate.

BY:
AMAR [ 4HG21CS004 ]
ABSTRACT

During this internship, the intern gained valuable experience in a variety of areas. The intern

was introduced to the basics of C programming, including data types, control structures, and

functions. Additionally, the intern learned how to use Microsoft Word, Excel, and Office to

create and edit documents, spreadsheets, and presentations. The intern also gained knowledge

in the areas of networking and mailing, including how to set up and configure networks and

how to use email effectively. Overall, the internship provided the intern with a broad range of

skills and knowledge that will be useful in their future career.

i
ACKNOWLEDGEMENT

The completion of any internship involves the efforts of many people. We have been
lucky to have received a lot of help, support from all directions during this internship,
so with the gratitude we take this opportunity to acknowledge all those who guide and
encouraged us.
We are extremely grateful to our principal Dr.T Rangaswamy B.E, M.Sc (Res), Ph.D for

creating an excellent and technically sound environment in our institution.


We would like to express our profound sense of gratitude to our department HOD Dr.K
C Ravishankar, B.E, M.Tech, Ph.D and our coordinator Dr. Raghu M.E, B.E, M.Tech, Ph.D ,

Dept. of CS&E and to all the faculty of CS&E Department for their guidance. It’s a
great pleasure to acknowledge for their help and encouragement rendered towards the
successful completion of internship.

BY:
AMAR [ 4HG21CS004 ]

ii
Contents

1 Introduction to C 1

1.1 Introduction to computer hardware and software . . . . . . . . . . . . . . . . . . 1

1.1.1 What is computer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.2 Computer generations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1.3 Computer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 History of C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Overview of C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3.1 Basic Structure of C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3.2 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3.3 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3.4 C Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Operators conditional statements: 7

2.1 Conditional statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.1.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Arrays and Strings 16

3.0.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Functions, Structures & Unions 20

4.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.1.1 Call by value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.1.2 Call by reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Structures: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

iii
CONTENTS CONTENTS

4.3 Unions: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.3.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5 Pointers 27

5.1 Overview of pointers in C: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.2 Pointers and Functions: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.3 Pointers and Structures: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5.3.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

6 File Handling 31

6.1 Why do we need File Handling in C? . . . . . . . . . . . . . . . . . . . . . . . . . 31

6.2 Types of Files in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.3 C File Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.4 File Pointer in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.5 File opening modes in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

6.6 Create a File in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.7 Reading From a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.8 Write to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.9 Closing a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.9.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

I Microsoft Office 36

7 MS Excel 37

7.1 Introduction to Microsoft Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.2 Feautures of Microsoft Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

7.2.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

8 MS Word 41

8.1 Introduction to MS Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8.2 Shortcut Keys: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8.3 Features of MS Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8.3.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

iv
CONTENTS CONTENTS

9 MS Power point 46

9.1 Introduction to MS Power point . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

9.1.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

10 MS Access 50

10.1 Introduction to MS Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

10.1.1 Components of MS Access . . . . . . . . . . . . . . . . . . . . . . . . . . 50

10.1.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

11 Networking and Mailing 54

11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

11.1.1 Email Protocols : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

11.1.2 SMTP (Simple Mail Transfer Protocol) . . . . . . . . . . . . . . . . . . . 55

11.1.3 POP(Post Office Protocol) . . . . . . . . . . . . . . . . . . . . . . . . . . 56

11.1.4 IMAP(Internet Message Access Protocol) . . . . . . . . . . . . . . . . . . 56

11.1.5 MIME(Multipurpose Internet Mail Extension Protocol) . . . . . . . . . . 56

11.2 Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

11.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

11.2.2 Basic Terminologies of Computer Networks . . . . . . . . . . . . . . . . . 57

11.2.3 Types of Enterprise Computer Networks . . . . . . . . . . . . . . . . . . . 58

v
List of Figures

1.1 basic structre of C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Data types in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1 Operators in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4.1 Call by value V/S Call by reference . . . . . . . . . . . . . . . . . . . . . . . . . . 21

6.1 File Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

7.1 MS Excel shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.2 Formulas and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

7.3 Table styles in Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7.4 Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8.1 Title bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8.2 Ribbon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

8.3 Home tool bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

8.4 Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

9.1 MS Power point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

9.2 Slide Design and Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

9.3 Slide Transitions and Animations . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

9.4 Charts and Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

10.1 Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

10.2 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

10.3 Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

10.4 Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

vi
List of Tables

1 Calender Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii

1.1 key words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

6.1 File opening modes in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.2 File Reading methodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.3 File writing methodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

8.1 Shortcut keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

vii
LIST OF TABLES LIST OF TABLES

Calendar

Table 1: Calender Schedule

Date Session Associate Teacher


11-10-2022 INTRODUCTION TO C Dr. Raghu M E
12-10-2022 ARRAYS AND STRINGS Ms. Madhuri H D
13-10-2022 FUNCTIONS,STRUCTURES & UNIONS Ms. Harshitha H R
14-10-2022 POINTERS Ms. Rakshitha SGK
17-10-2022 FILE HANDLING Ms. Deepa R
18-10-2022 MS EXCEL Ms. Madhuri H D
19-10-2022 MS WORD Harshitha H R
20-10-2022 MS POWERPOINT Ms. Deepa R
21-10-2022 NETWORKING AND MAILING Ms Rakshitha SGK

viii
Fundamentals of C Programming Language and MS Office 2022-23

Chapter 1

Introduction to C

1.1 Introduction to computer hardware and software

1.1.1 What is computer?

A computer is a programmable device that can store, retrieve, and process data. It was originally

used to describe humans who performed numerical calculations using me- chanical calculators,

such as the abacus and slide rule. However, with the invention of electronic computers, the

term came to refer to machines that could perform a wide range of tasks. Today’s computers

are electronic devices that accept data (input), process that data, produce output, and store

(storage) the results. They can perform a wide range of tasks, from simple calculations to

complex simulations and data analysis. A computer system typically includes hardware, an

operating system (main software), and peripheral equipment needed for full operation.

1.1.2 Computer generations

The generations in computer terminology describe a change in technology (on which the com-

puter system is designed) of a computer that is/was being used. The word “generation” was

used to differentiate between various hardware technologies. There are five generations of com-

puters123. Here is a brief explanation of each generation:

• First Generation (1940 - 1956): Vacuum Tubes

• Second Generation (1956 - 1963): Transistors

• Third Generation (1964 - 1971): Integrated Circuits

1 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

• Fourth Generation (1971 - Present): Microprocessors

• Fifth Generation (Present and Beyond): Artificial Intelligence

1.1.3 Computer types

Computers can be classified into different types based on their purpose, size, and power.
Here are some of the most common types of computers:

• Supercomputers: These are the fastest and most powerful computers available.
They are used for complex scientific calculations and simulations.

• Mainframe Computers: These are large computers that are used by large organiza-
tions to manage large amounts of data and run multiple applications simultaneously.

• Minicomputers: These are smaller than mainframe computers but larger than mi-
crocomputers. They are used in small businesses and organizations.

• Microcomputers: These are the most common type of computer and include desk-
tops, laptops, tablets, and smartphones.

• Workstation Computers: These are high-performance computers that are used for
specialized applications such as video editing, 3D modeling, and scientific simula-
tions.

• Server Computers: These are computers that provide services to other computers
on a network.

1.2 History of C

C is a general-purpose, high-level language that was originally developed by Dennis


M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first
implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and
Dennis Ritchie produced the first publicly available description of C, now known as
the KR standard. Today C is the most widely used and popular System Programming
Language.

2 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

1.3 Overview of C

1.3.1 Basic Structure of C

• Documentation :This section consists of the description of the program, the name of the

program, and the creation date and time of the program.

• Preprocessor Section :All the header files of the program will be declared in the prepro-

cessor section of the program.

• Definition :Preprocessors are the programs that process our source code before the process

of compilation. There are multiple steps which are involved in the writing and execution

of the program. Preprocessor directives start with the ‘’ symbol.

• Global Declaration :The global declaration section contains global variables, function dec-

laration, and static variables.

• Main() Function :Every C program must have a main function. The main() function

of the program is written in this section. Operations like declaration and execution are

performed inside the curly braces of the main program.

• Sub Programs :User-defined functions are called in this section of the program.

Figure 1.1: basic structre of C

3 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

1.3.2 Data Types

In C programming language, data types are used to define the type of a variable before
it is used in a program. A data type determines the size and type of values that can be
stored in a variable

Figure 1.2: Data types in C

1.3.3 Variables

A variable in C is a memory location with some name that helps store some form of
data and retrieves it when required. We can store different types of data in the variable
and reuse the same variable for storing some other data any number of times. C Variable
Syntax
datatype variable name = value; // defining single variable
or
datatype variable name1, variable name2; // defining multiple variable
Example:
int var; // variable definition
var = 10; // initialization

4 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

or
int var = 10; // variable declaration and definition

1.3.4 C Tokens

A token in C can be defined as the smallest individual element of the C programming


language that is meaningful to the compiler. It is the basic component of a C program.
Types of Tokens in C

• Keywords

• Identifiers

• Constants

• Strings

• Special Symbols

• Operators

Keywords:
The keywords are pre-defined or reserved words in a programming language. Each key-
word is meant to perform a specific function in a program.
C language supports 32 keywords which are given below:

Table 1.1: key words

auto double int struct


break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while

Identifiers :
Identifiers are used as the general terminology for the naming of variables, functions, and

5 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

arrays. These are user-defined names consisting of an arbitrarily long sequence of letters
and digits with either a letter or the underscore() asaf irstcharacter.Identif iernamesmustdif f erinspell

They must begin with a letter or underscore(−)

They must consist of only letters, digits, or underscore.

No other special character is allowed.

It should not be a keyword.

It must not contain white space.

It should be up to 31 characters long as

only the first 31 characters are significant.

Constants:

The constants refer to the variables with fixed values. They are like normal variables but with

the difference that their values can not be modified in the program once they are defined.

6 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 2

Operators conditional statements:

Figure 2.1: Operators in C

operators: Operators are symbols that trigger an action when applied to C variables and

other objects. The data items on which operators act are called operands. Depending on the

number of operands that an operator can act upon, operators can be classified as follows:

• Unary Operators: Those operators that require only a single operand to act upon are

known as unary operators.For Example increment and decrement operators

• Binary Operators: Those operators that require two operands to act upon are called

binary operators. Binary operators can further are classified into:

– Arithmetic operators

– Relational Operators

7 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

– Logical Operators

– Assignment Operators

item Bitwise Operator

• Ternary Operator: The operator that requires three operands to act upon is called the

ternary operator. Conditional Operator(?) is also called the ternary operator.

2.1 Conditional statements

2.1.1 INTRODUCTION

C language possesses such decision making capabilities by supporting the following state-

ments:

– If statement

– Switchstatement

– Conditional operator statement

– goto statement

– Loop statement

These statements are popularly known as decision making statements. Also known as

control statements.

1.if statement: This type of statement would enable a programmer to choose various

instruction sets on the basis of the available condition. The instruction sets will only get

executed when the evaluation of the condition turns out to be true. In case the evaluation

of the condition is false, there will be an execution of a different instruction set. These

are also known as decision control statements. These are of the following types:

if (Expression)

Statement1;

8 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Statement2;

If else:

In this statement, the execution of an array of instructions occurs only when the available

condition is correct. The verification of the next condition occurs when this first condition

is incorrect. In case all of the specifications fail even after the verification, then there will

be an execution of the default block statements. The remainder of the program’s ladder

is shown below.

The syntax for this statement is as follows:

If (condition 1)

Statement 1 (s1)

Else if (condition 2)

Statement 2 (s2);

else if (condition 3)

Statement 3 (s3)

. . .

Else

Statement 4 (s4)

Example

9 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

#include <stdio.h>

int main() {

int number

printf("Enter an integer: ");

scanf("%d", &number);

if (number > 0) {

printf("The number is positive.\n");

} else if (number < 0) {

printf("The number is negative.\n");

} else {

printf("The number is zero.\n");

return 0;

Switch statement

The C language offers its users with a selection statement in various ways in case a program

becomes difficult to read with an increased number of conditions. A switch statement is a

multi-way type of selection statement that would resolve this issue. The switch declaration

comes into play when more than three alternatives (conditions) exist in a program. This

command then switches between all the available blocks on the basis of the expression

value. Then, each block has a corresponding value with it.

The syntax for this statement is as follows:

Switch (expression A)

case A:

Statement A ;

Break;

case B:

10 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Statement B ;

Break;

case C:

Statement C ;

Break;

. . . .

case Z:

Statement Z ;

Break;

Default:

Statement 1 ; Break; }

Example

#include <stdio.h>

int main() {

int choice;

printf("Menu:\n");

printf("1. Print ’Hello’\n");

printf("2. Print ’World’\n");

printf("3. Exit\n");

printf("Enter your choice (1-3): ");

scanf("%d", &choice);

switch (choice) {

case 1:

printf("Hello\n");

break;

case 2:

printf("World\n");

11 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

break;

case 3:

printf("Exiting the program\n");

break;

default:

printf("Invalid choice\n");

break;

return 0;

Conditional Operator Statement

The C language also comes with a very unusual operator for its programmers – the con-

ditional operator.

The syntax of the conditional operator statements is as follows:

(condition 1)?

expression 1:

expression 2;

Here, the execution of the expression 1 will only occur when the given condition is valid.

In case this statement is incorrect, then the execution of the expression 2 will occur.

Goto Statement

The Goto statement is especially known in the case of jumping control statements. We

mainly use the goto statement when we want to transfer a program’s control from any

one block to another. Also, we use the goto keyword for the declaration of the goto

statement.

The syntax of the goto statement is as follows:

goto name of label;

12 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Looping statements

A programmer in C might want to repeat any set of instructions or certain statements in

the program to meet the necessary requirements. In such instances, it becomes difficult

to rewrite and repeat everything. And that is exactly where we would like to create loops

using the looping declarations. Loop control statements help in such types of situations

in C. We have the following types of loops in C:

While loop

Do while loop

For loop

While loop

While loop does not depend upon the number of iterations. In for loop the number of

iterations was previously known to us but in the While loop, the execution is terminated

on the basis of the test condition. If the test condition will become false then it will break

from the while loop else body will be executed.

Syntax:

initialization expression;

while (test expression) // body of the while loop

update expression;

Do while loop

The do-while loop is similar to a while loop but the only difference lies in the do-while

loop test condition which is tested at the end of the body. In the do-while loop, the loop

body will execute at least once irrespective of the test condition.

Syntax:

initialization expression; do // body of do-while loop

update expression;

while (test expression);

13 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

For loop

for loop in C programming is a repetition control structure that allows programmers to

write a loop that will be executed a specific number of times. for loop enables programmers

to perform n number of steps together in a single line.

Syntax:

for (initialize expression); test expression; update expression

Statement; }

Example

#include <stdio.h>

int main() {

// 1. While Loop

int i = 1;

printf("While Loop:\n");

while (i <= 5) {

printf("%d ", i);

i++;

printf("\n");

// 2. For Loop

printf("For Loop:\n");

for (int j = 1; j <= 5; j++) {

printf("%d ", j);

printf("\n");

// 3. Do-While Loop

printf("Do-While Loop:\n");

int k = 1;

do {

14 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

printf("%d ", k);

k++;

} while (k <= 5);

printf("\n");

// 4. Nested Loop (For loop inside another)

printf("Nested Loop:\n");

for (int row = 1; row <= 3; row++) {

for (int col = 1; col <= 3; col++) {

printf("(%d, %d) ", row, col);

printf("\n");

return 0;

2.1.2 Summary

In this chapter we learned about history of C programming language. Next we saw char-

acteristic features of c programming language. Further we learned about the C program

structure. Moving ahead ,we learned about various C tokens used in C program. Further

we learned about basic data types used in c program and their storage size. Further more

we learned about different control statements used in c program and there application

with an example . In addition to that we learned about various loops used in c program

and an example for each.

15 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 3

Arrays and Strings

Definition and Declaration:

An array in C is a collection of elements of the same data type stored in contiguous

memory locations. It allows the efficient organization and access of multiple values using

a single variable name. Arrays are declared using the following syntax:

int[] numbers = new int[5];

Array elements are accessed using an index, which starts from 0 for the first element, 1

for the second, and so on. For example, to access the third element of an integer array

named numbers, you would use:

int thirdElement = numbers[2]; // Index starts from 0

Initializing Arrays:

Arrays can be initialized during declaration or at a later stage using assignment. To

initialize an array during declaration, provide a comma-separated list of values enclosed

in curly braces. For example:

int numbers[5] = 10, 20, 30, 40, 50; If not initialized explicitly, array elements are set to

default values (e.g., 0 for integers, ” for characters).

Multidimensional Arrays: C supports multidimensional arrays, such as 2D and 3D

arrays. These are arrays of arrays, allowing data to be stored in rows and columns or

higher dimensions. For example, a 2D array can be declared and initialized as follows:

16 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Example

Example

#include <stdio.h>

int main() {

int matrix[3][3] = {

{1, 2, 3},

{4, 5, 6},

{7, 8, 9}

};

printf("Matrix elements:\n");

for (int i = 0; i < 3; i++) {

for (int j = 0; j < 3; j++) {

printf("%d\t", matrix[i][j]);

printf("\n"); // Move to the next row

return 0;

Strings in C Programming

Definition and Initialization: In C, a string is a sequence of characters stored as a character

array. It is terminated by a null character (”), which marks the end of the string. Strings

can be initialized directly using double quotes during declaration.

For example:

char greeting[] = ”Hello, world!”;

String Handling Functions:

C provides a set of standard string handling functions, declared in the string.h header, to

manipulate strings. Some commonly used functions include:

strlen(): Calculates the length of a string (excluding the null character). strcpy(): Copies

one string to another. strcat(): Concatenates (appends) one string to the end of another.

17 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

strcmp(): Compares two strings lexicographically.

Example

#include <stdio.h>

#include <string.h>

int main() {

char input[100];

printf("Enter a string: ");

fgets(input, sizeof(input), stdin);

input[strcspn(input, "\n")] = ’\0’;

int length = strlen(input);

printf("Length of the string: %d\n", length);

char copy[100];

strcpy(copy, input);

printf("Copy of the string: %s\n", copy);

char append[200];

strcpy(append, "Appended: ");

strcat(append, input);

printf("Appended string: %s\n", append);

char compareStr[100];

printf("Enter a string to compare with the input: ");

scanf("%s", compareStr);

int cmpResult = strcmp(input, compareStr);

if (cmpResult == 0) {

printf("The input and the comparison string are equal.\n");

} else if (cmpResult < 0) {

printf("The input comes before the comparison string.\n");

} else {

printf("The input comes after the comparison string.\n");

char searchStr[100];

printf("Enter a substring to search for in the input: ");

scanf("%s", searchStr);

18 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

char *found = strstr(input, searchStr);

if (found != NULL) {

printf("Substring found at position: %ld\n", found - input);

} else {

printf("Substring not found in the input.\n");

return 0;

Input and Output of Strings:

Inputting strings using scanf() and outputting strings using printf() require special format

specifiers (sample example:

char name[50];

printf(”Enter your name: ”);

scanf(”

printf(”Hello,

However, these functions may encounter issues with spaces and buffer overflows, requiring

careful handling of input.

3.0.1 Summary

In first section of this chapter we learned about the array data structure. After in-

troduction ,array declaration ,different ways of array intialization and accessing array

elements were thought. Next we learned about different types of arrays,it includes one-

dimensional,multi-dimensional arrays and their declaration and initialization with an ex-

ample for each. In next section ,we learned about basics of string. Following the introdu-

tion, we learned about different string operations with an example for each operation. -

Finally we saw an example program which perform different string operations.

19 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 4

Functions, Structures & Unions

4.1 Functions

Functions in C are blocks of code that perform specific tasks and can be called from

other parts of the program. Sure! Here’s a brief explanation of the types of functions in

C:

1. Library Functions (Built-in Functions):

– Pre-defined functions provided by C’s standard library or external libraries.

– Ready to use without additional setup.

– Examples: printf(), scanf(), sqrt(), etc.

2.User-Defined Functions::

– Created by the programmer to perform specific tasks.

– Defined and implemented in the C program by the user.

– Promote code reusability and organization.

20 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

4.1.1 Call by value

In C programming functions can be called using different parameter passing mechanisms,

one of which is ”call by value.” Call by value involves passing the actual value of the

argument to the function, rather than a reference to the original variable. This means

that any modifications made to the parameter inside the function do not affect the original

variable outside the function.

4.1.2 Call by reference

Call by reference is a parameter passing mechanism in computer programming languages,

where a reference to the actual data (memory location) is passed to a function as an ar-

gument, rather than a copy of the data itself. This means that any changes made to the

parameter within the function will directly affect the original data outside the function as

well.

Figure 4.1: Call by value V/S Call by reference

21 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Example

#include <stdio.h>

int addNumbers(int a, int b) {

return a + b;

int main() {

int num1, num2, sum;

printf("Enter the first number: ");

scanf("%d", &num1);

printf("Enter the second number: ");

scanf("%d", &num2);

sum = addNumbers(num1, num2);

printf("Sum of %d and %d is %d\n", num1, num2, sum);

return 0;

4.2 Structures:

Structures are used to represent a record.Structures are useful for creating more complex

data structures and for representing real-world entities with multiple attributes. They are

widely used in C programming to organize and manage data efficiently.

Syntax of Structures:

struct Structure Name {

dataType member1;

...

dataType member2;

22 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

};

Structure Declaration

We have to declare structure in C before using it in our program. In structure declaration,

we specify its member variables along with their datatype. We can use the struct keyword

to declare the structure in C using the following syntax:

Syntax:

Struct structure name

data type member name1;

data type member name1;

The above syntax is also called a structure template or structure prototype and no memory

is allocated to the structure in the declaration

Initialize Structure

Structure members cannot be initialized with the declaration. For example, the following

C program fails in the compilation.

struct Point int x = 0; // COMPILER ERROR: cannot initialize members here

int y = 0; // COMPILER ERROR: cannot initialize members here.

Access structure

We can access structure members by using the ( . ) dot operator.

Example

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

struct Student {

char* name;

int roll_number;

23 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

int age;

double total_marks;

};

int main()

int i = 0, n = 5;

struct Student student[n];

student[0].roll_number = 1;

student[0].name = "Geeks1";

student[0].age = 12;

student[0].total_marks = 78.50;

student[1].roll_number = 5;

student[1].name = "Geeks5";

student[1].age = 10;

student[1].total_marks = 56.84;

student[2].roll_number = 2;

student[2].name = "Geeks2";

student[2].age = 11;

student[2].total_marks = 87.94;

printf("Student Records:\n\n");

for (i = 0; i < n; i++)

printf("\tName = %s\n", student[i].name);

printf("\tRoll Number = %d\n", student[i].roll_number);

printf("\tAge = %d\n", student[i].age);

printf("\tTotal Marks = %0.2f\n\n", student[i].total_marks);

return 0;

24 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

4.3 Unions:

A union is a special data type available in C that allows to store different data types in

the same memory location.

Syntax of Unions:

union [union tag] {

member definition;

member definition;

member definition; }

Example

#include <stdio.h>

union Result {

int intValue;

float floatValue;

};

int main() {

int num1 = 10;

int num2 = 20;

union Result result;

result.intValue = num1 + num2;

printf("Sum as an integer: %d\n", result.intValue);

printf("Sum as a float: %.2f\n", result.floatValue);

return 0;

4.3.1 Summary

At the beginning of this chapter we saw introduction about functions. After that we

learned about basic of function. Next we learned about function declaration,function call

25 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

and function defination . Further we saw an example program of adding two numbers using

function. In the next section this chapter we were introduced about derived data type i.e

structures. In strucutures we learned about its basic syntax ,declaration of variables and

different ways of initializing and accessing structure members. In the last section of this

chapterwe were introduced about derived data type i.e union. In unions we learned about

its basic syntax ,declaration of variables and different ways of initializing and accessing

structure members.

26 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 5

Pointers

Pointers in C are variables that store memory addresses.

5.1 Overview of pointers in C:

1. Declaration: Pointers are declared using an asterisk (‘*‘) before the variable name,

indicating that it will store a memory address.

2. Initialization: Pointers can be initialized with the address of another variable using

the address-of operator.

3. Dereferencing: To access the value pointed to by a pointer (i.e., the value at the

memory address it holds), you use the dereference operator (‘*‘).

4. Null Pointer: A pointer can be set to ‘NULL‘ to indicate that it doesn’t currently

point to any valid memory location.

Pointers are powerful and essential for advanced C programming, enabling dynamic mem-

ory allocation, passing parameters to functions by reference, and implementing data struc-

tures like linked lists. In C, pointers and arrays have a close relationship. Here are some

key points to understand the relationship between pointers and arrays:

1. Array Name as a Pointer: - In C, when you use the name of an array in an

expression, it implicitly acts as a pointer to the first element of the array. - For example,

if you have an integer array ‘int arr[5];‘, the expression ‘arr‘ represents a pointer to the

first element ‘arr[0]‘ of the array.

27 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

2. Pointer Arithmetic and Array Elements: - Since arrays are stored in contiguous

memory locations, you can use pointer arithmetic to access elements in an array. - For

example, if ‘ptr‘ is a pointer to an integer array, ‘ptr + 1‘ points to the second element,

‘ptr + 2‘ points to the third element, and so on.

3. Initialization and Assigning Pointers to Arrays: - Pointers can be initialized

with the address of the first element of an array. For example, ‘int *ptr = arr;‘ initializes

the pointer ‘ptr‘ with the address of the first element of the ‘arr‘ array.

4. Passing Arrays to Functions: - When you pass an array to a function in C, you

are actually passing a pointer to the first element of the array. - Therefore, functions can

directly work with array elements using pointer notation.

Example:

include <stdio.h>

int main() {

int number = 42;

int *ptr;

ptr = &number;

printf("Value of number: %d\n", number);

printf("Address of number: %p\n", &number);

printf("Value of ptr (address of number): %p\n", ptr);

printf("Value pointed to by ptr: %d\n", *ptr); // Dereference the pointer to access

*ptr = 99;

printf("Modified value of number: %d\n", number);

return 0;

28 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

5.2 Pointers and Functions:

1. Passing Pointers to Functions: Functions can receive pointers as parameters,

allowing them to access and modify data at the memory address pointed to by the pointer.

This enables functions to work with the original data and not just a copy.

2. Dynamic Memory Allocation: Functions can use pointers to allocate memory

dynamically on the heap using functions like ‘malloc‘ and ‘calloc‘. This allows for flexible

memory usage, especially when the size of data is not known at compile-time.

3. Function Pointers: Pointers can also point to functions, known as function pointers.

Function pointers allow for selecting and calling different functions at runtime, providing

flexibility and extensibility to programs. They are often used in advanced programming

techniques and callback functions.

Example

#include <stdio.h>

struct Point {

int x;

int y;

};

void initializePoint(struct Point *point, int x, int y) {

point->x = x;

point->y = y;

void printPoint(const struct Point *point) {

printf("Point coordinates: (%d, %d)\n", point->x, point->y);

int main() {

struct Point myPoint;

struct Point *pointerToMyPoint = &myPoint;

initializePoint function

initializePoint(pointerToMyPoint, 3, 4);

29 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

printPoint function

printPoint(pointerToMyPoint);

return 0;

5.3 Pointers and Structures:

1. Structures: - Structures are user-defined data types that can hold multiple variables

of different data types under one name. - Each variable within a structure is called a

member or field. - Structures provide a convenient way to organize related data and pass

it around as a single entity.

2. Pointers to Structures: - Pointers can be used to point to structures, allowing

efficient access and manipulation of structure members. - By using pointers to structures,

you can avoid making copies of large structures when passing them as function arguments,

making program execution more efficient.

3. Dynamic Memory Allocation for Structures: - Pointers to structures are often

used for dynamic memory allocation of structures on the heap using functions like ‘malloc‘.

- Dynamic allocation allows you to create structures at runtime and manage memory

efficiently.

5.3.1 Summary

A pointer is nothing but a memory location where data is stored. A pointer is used to

access the memory location. There are various types of pointers such as a null pointer,

wild pointer, void pointer and other types of pointers. Pointers can be used with array

and string to access elements more efficiently. We can create function pointers to invoke a

function dynamically. Arithmetic operations can be done on a pointer which is known as

pointer arithmetic. Pointers can also point to function which make it easy to call different

functions in the case of defining an array of pointers. When you want to deal different

variable data type, you can use a typecast void pointer.

30 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 6

File Handling

6.1 Why do we need File Handling in C?

So far the operations using the C program are done on a prompt/terminal which
is not stored anywhere. The output is deleted when the program is closed. But in
the software industry, most programs are written to store the information fetched
from the program. The use of file handling is exactly what the situation calls for.

In order to understand why file handling is important, let us look at a few features
of using files:

– Reusability: The data stored in the file can be accessed, updated, and deleted
anywhere and anytime providing high reusability.

– Portability: Without losing any data, files can be transferred to another in


the computer system. The risk of flawed coding is minimized with this feature.

– Efficient: A large amount of input may be required for some programs. File
handling allows you to easily access a part of a file using few instructions which
saves a lot of time and reduces the chance of errors.

– Storage Capacity: Files allow you to store a large amount of data without
having to worry about storing everything simultaneously in a program.

Binary Files

31 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

6.2 Types of Files in C

A file can be classified into two types based on the way the file stores the data. They

are as follows: Text Files

– Text Files

– Binary Files

6.3 C File Operations

C file operations refer to the different possible operations that we can perform on a file

in C such as:

– Creating a new file – fopen() with attributes as “a” or “a+” or “w” or “w+”

– Opening an existing file – fopen()

– Reading from file – fscanf() or fgets()

– Writing to a file – fprintf() or fputs()

– Moving to a specific location in a file – fseek(), rewind()

– Closing a file – fclose()

6.4 File Pointer in C

A file pointer is a reference to a particular position in the opened file. It is used


in file handling to perform all file operations such as read, write, close, etc. We
use the FILE macro to declare the file pointer variable. The FILE macro is defined
inside ¡stdio.h¿ header file.
Syntax of File Pointer
FILE* pointern ame;

6.5 File opening modes in C

32 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Figure 6.1: File Functions

Opening Modes Description


rb Open for reading in binary mode.
w Open for reading in text mode.
wb Open for writing in binary mode.
a Searches file.
ab Open for append in binary mode.

Table 6.1: File opening modes in C

6.6 Create a File in C

The fopen() function can not only open a file but also can create a file if it does
not exist already. For that, we have to use the modes that allow the creation of a
file if not found such as w, w+, wb, wb+, a, a+, ab, and ab+.
Syntaxa:
FILE *fptr; fptr = fopen(”filename.txt”, ”w”);

33 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

6.7 Reading From a File

The file read operation in C can be performed using functions fscanf() or fgets().
Both the functions performed the same operations as that of scanf and gets but
with an additional parameter, the file pointer. There are also other functions we
can use to read from a file. Such functions are listed below:

Function Description
fscanf() Use formatted string and variable arguments list to take input from a file.
fgets() Input the whole line from the file.
fgetc() Reads a single character from the file.
fread() Reads the specified bytes of data from a binary file.

Table 6.2: File Reading methodes

6.8 Write to a File

The file write operations can be performed by the functions fprintf() and fputs()
with similarities to read operations. C programming also provides some other func-
tions that can be used to write data to a file such as:

Function Description
fprintf() Similar to printf().
fputs() Prints the whole line in the file and a newline at the end.
fputc() Prints a single character into the file.

Table 6.3: File writing methodes

6.9 Closing a File

The fclose() function is used to close the file. After successful file operations, you
must always close a file to remove it from the memory.
Syntax of fclose()
fclose(filep ointer);

34 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

6.9.1 Summary

File handling in C involves manipulating files using file pointers and functions from
the standard library. Key operations include opening, reading, writing, and closing
files. You specify file modes like ”r” for reading or ”w” for writing. Error handling
is crucial, and files can be in binary or text mode.

35 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Part I

Microsoft Office

36 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 7

MS Excel

7.1 Introduction to Microsoft Excel

Microsoft Excel was first introduced on September 30, 1985. It was developed by Mi-
crosoft Corporation and initially released for the Apple Macintosh computer. Excel
is part of the Microsoft Office suite, which also includes other popular productivity
software like Microsoft Word and Microsoft PowerPoint.

Shortcut keys

The use of shortcut keys in Excel is one of the main features of this powerful
spreadsheet program. MS Excel has an extensive range of shortcut keys that help
users reduce their working time. The keyboard shortcuts are essential alternatives
to using a mouse or a touchscreen to perform most excel commands instantly.

Since Excel has a pretty long list of shortcut keys, we discuss the few essential Excel
shortcuts keys below:

7.2 Feautures of Microsoft Excel

1.Spreadsheet Application: Microsoft Excel is a spreadsheet application that


allows you to organize data in a grid format, with rows and columns. Each cell in
the grid can contain text, numbers, formulas, or other data.

37 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Figure 7.1: MS Excel shortcut keys

2. Data Entry and Manipulation: You can easily enter data into the cells, edit
it, and perform various data manipulation tasks like copying, cutting, and pasting
data.

3.Charts and Graphs: You can create various types of charts and graphs to
visually represent and analyze data. Excel offers a wide range of chart options for
better data visualization.

4.Formulas and Functions: Excel provides a powerful formula engine that en-
ables you to create calculations using mathematical operators and built-in functions.
Formulas allow you to perform complex calculations and automate tasks.

Figure 7.2: Formulas and Functions

5.Data Analysis Tools: Excel provides tools like pivot tables, data validation, and
filters that help you analyze and summarize data, find patterns, and gain insights
from large datasets.

6.Conditional Formatting: This feature lets you apply formatting to cells based
on specific conditions. It’s useful for highlighting important data or visualizing data
trends.

7.Data Import and Export: You can import data from various sources like text

38 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

files or databases, and export Excel files to different formats, making it easy to share
and exchange data.

8.Formatting and Styling: Excel allows you to format cells, rows, and columns
to customize the appearance of your data. You can change fonts, colors, and apply
borders to make your data more visually appealing.

Figure 7.3: Table styles in Excel

9.Collaboration and Sharing: Excel supports collaboration, allowing multiple


users to work on the same file simultaneously. You can also track changes and
comments to improve teamwork.

10.Data Protection: Excel offers features for protecting sensitive data, such as
setting passwords to protect sheets or workbooks, ensuring data security.

11. Data Validation: You can define rules to control the type and range of data
that users can enter in cells, reducing the risk of errors in your data.

12.Macros: Advanced users can create and run macros, which are sets of recorded
actions, to automate repetitive tasks and streamline workflows.

7.2.1 Summary

Introduction of MS Excel : Microsoft Excel is a powerful spreadsheet program used


to record, manipulate, store numeric data and it can be customized to match your
preferences The ribbon is used to access various commands in Excel The options
dialogue window allows you to customize a number of items i.e. the ribbon, formulas,

39 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Figure 7.4: Macros

proofing, save, etc.

40 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 8

MS Word

8.1 Introduction to MS Word

Microsoft Word, commonly known as MS Word, is a word processing software de-


veloped by Microsoft Corporation. It is one of the most widely used applications for
creating, editing, and formatting text-based documents. MS Word provides a range
of tools and features to help users create professional-looking documents, including
letters, reports, essays, resumes, and more.

8.2 Shortcut Keys:

8.3 Features of MS Word

Tttle bar

Figure 8.1: Title bar

This is a close-up view of the Title Bar, where file information is located. Notice
the three buttons on the right side, controlling program features. The Ribbon Menu
System The tabbed Ribbon menu system is how you navigate through Word and
access the various Word commands. If you have used previous versions of Word,

41 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Action Shortcut Keys


Create a new workbook Ctrl + N
Open an existing workbook Ctrl + O
Save the current workbook Ctrl + S
Print the current workbook Ctrl + P
Cut selected cells Ctrl + X
Copy selected cells Ctrl + C
Paste copied or cut cells Ctrl + V
Undo the last action Ctrl + Z
Redo the last undone action Ctrl + Y
Select all cells Ctrl + A
Bold selected text Ctrl + B
Italicize selected text Ctrl + I
Underline selected text Ctrl + U
Insert current date Ctrl + ; (semicolon)
Insert current time Ctrl + Shift + ;
Find text within the workbook Ctrl + F
Replace text within the workbook Ctrl + H
Insert a new row Ctrl + Shift + +
Insert a new column Ctrl + Shift + =
Delete selected row(s) Ctrl + - (minus)
Delete selected column(s) Ctrl + - (minus)
Move to the next worksheet Ctrl + Page Down
Move to the previous worksheet Ctrl + Page Up

Table 8.1: Shortcut keys

Ribbon

The Ribbon system replaces the traditional menus. Above the Ribbon in the upper-
left corner is the Microsoft Office Button. From here, you can access important
options such as New, Save, Save As, and Print. By default the Quick Access Toolbar
is pinned next to the Microsoft Office Button, and includes commands such as Undo
and Redo.

Home tool bar

Toolbars provide ”shortcuts” to commands also found in the Menu Bar. Toolbars
are usually located just below the Menu Bar and exist to offer another way to
perform the same task. The most commonly used commands in MS Word are also
the most accessible. Some of these commands are:

42 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Figure 8.2: Ribbon

Figure 8.3: Home tool bar

Figure 8.4: Keyboard

Keyboard

Microsoft Word was introduced on October 25, 1983, by Microsoft Corporation.


The initial version was developed for the MS-DOS operating system. Since then, it
has undergone numerous updates and improvements, becoming an essential tool for
word processing in various professional, educational, and personal environments.

43 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

In order to use MS Word effectively, you must input commands using both the
mouse and the keyboard. The above image of a keyboard may closely resemble (if it
is not identical to) the keyboard in front of you; learning just a few certain keys will
help to improve your efficiency in typing as well as present you with more options
within the program. The following is a list of commonly used keys that have special
functions in MS Word (key functions can change depending on which program you
are using):

1. Backspace: This key deletes backwards as you type.

2. Delete: This key deletes forwards as you type.

3. Shift: This key, when pressed WITH another key, will perform a secondary
function.

4. Spacebar: This key enters a space between words as you type.

5. Tab: This key will force the cursor to indent, or jump forward 10 spaces.

6. Caps Lock: This key will present the capitalized version of each letter key.

7. Control (Ctrl): This key, when pressed WITH another key, performs as short-
cut.

8. Enter: This key executes a command (pressed in MS Word, it begins a new


line).

9. Number keypad: This is a redundant keypad existing only for user preference.

10. Arrow keys: Like the mouse, these keys are used to navigate through the
document.

Text Entry and Editing: Users can easily enter and modify text in a document,
allowing for seamless content creation and revision.

Formatting Options: MS Word offers various formatting tools to adjust font


styles, sizes, colors, alignment, and apply styles to enhance the appearance of the
text.

Images and Graphics: Users can insert images, illustrations, and other graphics

44 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

into the document to make it visually appealing and informative.

Tables and Charts: MS Word allows users to create tables and insert charts for
organizing and presenting data in a structured manner.

Templates: The application provides pre-designed templates for different docu-


ment types, making it easy to create professional documents without starting from
scratch.

Headers and Footers: Users can add headers and footers to their documents,
which appear at the top and bottom of each page, respectively.

Review and Collaboration: MS Word has features for tracking changes, adding
comments, and enabling real-time collaboration with others during document edit-
ing.

Spelling and Grammar Checking: The software includes built-in spelling and
grammar checking tools to help users identify and correct errors in their text.

9.Page Layout: Users can control the page layout, paper size, orientation, and
page margins to achieve the desired document appearance.

8.3.1 Summary

Introduction of MS Word : Microsoft Word is used to create professional quality


reports,documents,resumes and letters. it has advanced features which allow you for
format and edit your files and documents in the possible ways. Writing in various
fonts and size and using tables,borders and bullets formatting reduces tediousness
and increases productivity

45 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 9

MS Power point

9.1 Introduction to MS Power point

Microsoft PowerPoint, commonly known as MS PowerPoint, is a powerful presenta-


tion software developed by Microsoft Corporation. It is part of the Microsoft Office
suite and is designed to create and deliver visually appealing and dynamic presen-
tations. MS PowerPoint provides a user-friendly interface with a range of tools and
features to help users create engaging slideshows for various purposes, including
business presentations, academic lectures, training sessions, and more.

Figure 9.1: MS Power point

46 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Features of MS PowerPoint

1.Slide Creation: MS PowerPoint allows users to create individual slides where


they can add text, images, charts, graphs, videos, and other multimedia elements.

2.Slide Design and Formatting: The software offers a wide range of pre-designed
templates and customizable themes, enabling users to create professionally designed
slides with consistent formatting.

Figure 9.2: Slide Design and Formatting

3.Slide Transitions and Animations: MS PowerPoint provides various slide


transition effects and animations to add visual appeal and make the presentation
more dynamic during the delivery.

Figure 9.3: Slide Transitions and Animations

4.Slide Show Mode: Users can present their slides in a full-screen mode, using
tools like presenter view, annotations, and timers to assist during the presentation.

47 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

5.Collaboration and Sharing: MS PowerPoint supports collaboration, allowing


multiple users to work on the same presentation simultaneously and share it with
others through cloud-based sharing options.

6.Media Integration: MS PowerPoint supports the integration of multimedia


elements, such as audio and video files, making the presentations more engaging
and interactive.

7.Charts and Diagrams: Users can easily create various types of charts, graphs,
and diagrams to visualize data and information effectively.

Figure 9.4: Charts and Diagrams

8.Notes and Handouts: Users can add speaker notes to each slide for reference
during the presentation and generate handouts for the audience to take away.

Microsoft PowerPoint was introduced on April 20, 1987, for the Apple Macintosh
computer. Since its inception, it has become a standard tool for creating and deliv-
ering presentations in various fields and industries. Its intuitive interface, extensive
features, and seamless integration with other Microsoft Office applications make it
a preferred choice for individuals, educators, business professionals, and speakers
for creating compelling and impact full presentations.

48 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

9.1.1 Summary

Introduction of Power point : Used to create It is presentation based program that


uses graphics videos etc,, to make presentation more interactive and interest. Power
point presentation comprising slides another features is also known as power point.

49 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 10

MS Access

10.1 Introduction to MS Access

MS-Access is application software for managing the databases. It is released by


Microsoft in November 1992. It actually stores the data on the basis of the relational
Jet Database Engine. It mainly provides the graphical user interface for accessing
the data and the tools for software development.

It helps the users for managing the related data more efficiently than Microsoft Excel
or other applications of spreadsheets. Users can easily analyze the large amount of
data stored in it.

It is not used to create large or enterprise-level databases but mainly used to cre-
ate small databases. For the large databases, Microsoft provides the SQL server
database engine.

10.1.1 Components of MS Access

Tables

It is the main component of the MS Access software. In the MS Access database,


tables are mainly used for storing the data or information in the form of rows and
columns. The Access tables which contain the data or information look similar to
the tables in MS Excel or MS Word. Whenever, you create a new database in MS

50 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Figure 10.1: Table

Access, firstly, you have to create a table in that database. You can also relate a
specific table to other tables, and easily define the primary key in that table.

Relationships

Relationships are the links or connections, which are formed between the one or
more tables in the database. There exist following four types of relationships:

1.One-to-One Relationship

2.One-to-Many Relationship

3.Many-to-One Relationship

4.Many-to-Many Relationship

Queries

Figure 10.2: Queries

Queries are the commands, which are used to retrieve the data or information from

51 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

the database. It also allows you to insert the information in the MS Access database.

Forms It is an object or a component, which helps the users for entering the data

Figure 10.3: Forms

in the table of any database by an interface. Any user can easily display the data
of the database.

Reports When the users inserted the data in the database, then they can easily

Figure 10.4: Report

view their information in an organized manner by running the reports. Unlike forms,
the reports cannot be edited.

Macros

Macros are used for performing the repetitive tasks on reports and forms in the MS
Access database. It also allows the user for adding functionalities to forms, controls,

52 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

and reports.

Modules

Modules are used to perform the automating routine operations and user-defined
functions which are written in VBA. Any user can easily use these modules from
anywhere in the MS Access database.

10.1.2 Summary

MS Access is used to store large amount data in an organised and efficient manner.
It allows you to create tables,forms, queries and reports to manage your data.Ms
Access can be used to develop application software and is generally used data archi-
tects, software developers and manage account bills.Store data in the form of tables
and edit or customise them later as per the requirement of the user

53 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 11

Networking and Mailing

11.1 Introduction

Networking and mailing are two important aspects of modern communication.


Email protocols are a collection of protocols that are used to send and receive
emails properly. The email protocols provide the ability for the client to transmit
the mail to or from the intended mail server. Email protocols are a set of commands
for sharing mails between two computers. Email protocols establish communication
between the sender and receiver for the transmission of email1.

There are three basic types of email protocols: SMTP, POP3, and IMAP. SMTP
(Simple Mail Transfer Protocol) is used to send mails over the internet. It is efficient
and reliable for sending emails. POP (Post Office Protocol) is used to retrieve email
for a single client. It allows to access mail offline and thus, needs less internet time.
IMAP (Internet Message Access Protocol) is used to retrieve mails for multiple
clients. It allows to access email without downloading them and also supports email
download1.

Networking emails are a social lubricant that keeps the business world working.
An email for networking can create a new connection or maintain an old one that
can transform your career. Writing a networking email can be challenging as you
must strike the right tone, making a personal connection but staying professional2.
In a hybrid work environment, sending an effective introductory email is a critical

54 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

skill for career growth3.

11.1.1 Email Protocols :

Email protocols are a collection of protocols that are used to send and receive
emails properly. The email protocols provide the ability for the client to transmit
the mail to or from the intended mail server. Email protocols are a set of commands
for sharing mails between two computers. Email protocols establish communication
between the sender and receiver for the transmission of email. Email forwarding
includes components like two computers sending and receiving emails and the mail
server. There are three basic types of email protocols. Types of Email Protocols:
Three basic types of email protocols involved for sending and receiving mails are:

– SMTP

– POP3

– IMAP

11.1.2 SMTP (Simple Mail Transfer Protocol)

Simple Mail Transfer Protocol is used to send mails over the internet. SMTP is an
application layer and connection-oriented protocol. SMTP is efficient and reliable
for sending emails. SMTP uses TCP as the transport layer protocol. It handles the
sending and receiving of messages between email servers over a TCP/IP network.
This protocol along with sending emails also provides the feature of notification
for incoming mails. When a sender sends an email then the sender’s mail client
sends it to the sender’s mail server and then it is sent to the receiver mail server
through SMTP. SMTP commands are used to identify the sender and receiver email
addresses along with the message to be sent.

Some of the SMTP commands are HELLO, MAIL FROM, RCPT TO, DATA,
QUIT, VERIFY, SIZE, etc. SMTP sends an error message if the mail is not delivered
to the receiver hence, reliable protocol.

55 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

11.1.3 POP(Post Office Protocol)

Post Office Protocol is used to retrieve email for a single client. POP3 version
is the current version of POP used. It is an application layer protocol. It allows
to access mail offline and thus, needs less internet time. To access the message it
has to be downloaded. POP allows only a single mailbox to be created on the mail
server. POP does not allow search facilities

Some of the POP commands are LOG IN, STAT, LIST, RETR, DELE, RSET, and
QUIT.

11.1.4 IMAP(Internet Message Access Protocol)

Internet Message Access Protocol is used to retrieve mails for multiple clients.
There are several IMAP versions: IMAP, IMAP2, IMAP3, IMAP4, etc. IMAP is an
application layer protocol. IMAP allows to access email without downloading them
and also supports email download. The emails are maintained by the remote server.
It enables all email operations such as creating, manipulating, delete the email with-
out reading it. IMAP allows you to search emails. It allows multiple mailboxes to
be created on multiple mail servers and allows concurrent access. Some of the IMAP
commands are: IMAPL OGIN, CREAT E, DELET E, REN AM E, SELECT, EXAM IN E, andL

11.1.5 MIME(Multipurpose Internet Mail Extension Protocol)

Multipurpose Internet Mail Extension Protocol is an additional email protocol


that allows non-ASCII data to be sent through SMTP. It allows users to send and
receive different types of data like audio, images, videos and other application pro-
grams on the Internet. It allows to send multiple attachments with single message.
It allows to send message of unlimited length.

56 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

11.2 Networking

11.2.1 Introduction

Networking is the practice of connecting computers together to enable communi-


cation and data exchange between them. A computer network is a collection of two
or more computers that are connected either by cables (wired) or WiFi (wireless)
with the purpose of transmitting, exchanging, or sharing data and resources. The
basic building blocks of a computer network are nodes and links. A network node
can be equipment for data communication like a modem, router, etc., or equip-
ment of a data terminal like connecting two computers or more. Link in computer
networks can be defined as wires or cables or free space of wireless networks.

There are several types of computer networks, including LAN (Local Area Net-
work), WAN (Wide Area Network), WLAN (Wireless Local Area Network), MAN
(Metropolitan Area Network), PAN (Personal Area Network), SAN (Storage Area
Network), and CAN (Campus Area Network). Each type of network serves different
needs and is defined by its geographic location, the protocols it uses to communi-
cate, the physical arrangement of its components, how it controls traffic, and its
purpose.

11.2.2 Basic Terminologies of Computer Networks

– Network: A network is a collection of computers and devices that are con-


nected together to enable communication and data exchange.

– Nodes: Nodes are devices that are connected to a network. These can include
computers, Servers, Printers, Routers, Switches, and other devices.

– Protocol: A protocol is a set of rules and standards that govern how data is
transmitted over a network. Examples of protocols include TCP/IP, HTTP,
and FTP.

– Topology: Network topology refers to the physical and logical arrangement


of nodes on a network. The common network topologies include bus, star,
ring, mesh, and tree.

57 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

– Service Provider Networks: These types of Networks give permission to


take Network Capacity and Functionality on lease from the Provider. Service
Provider Networks include Wireless Communications, Data Carriers, etc.

– IP Address: An IP address is a unique numerical identifier that is assigned


to every device on a network. IP addresses are used to identify devices and
enable communication between them.

– DNS: The Domain Name System (DNS) is a protocol that is used to translate
human-readable domain names (such as www.google.com) into IP addresses
that computers can understand.

– Firewall: A firewall is a security device that is used to monitor and control


incoming and outgoing network traffic. Firewalls are used to protect networks
from unauthorized access and other security threats.

11.2.3 Types of Enterprise Computer Networks

– LAN: A Local Area Network (LAN) is a network that covers a small area,
such as an office or a home. LANs are typically used to connect computers
and other devices within a building or a campus.

– WAN: A Wide Area Network (WAN) is a network that covers a large geo-
graphic area, such as a city, country, or even the entire world. WANs are used
to connect LANs together and are typically used for long-distance communi-
cation.

– Cloud Networks: Cloud Networks can be visualized with a Wide Area Net-
work (WAN) as they can be hosted on public or private cloud service providers
and cloud networks are available if there is a demand. Cloud Networks consist
of Virtual Routers, Firewalls, etc.

These are just a few basic concepts of computer networking. Networking is a vast
and complex field, and there are many more concepts and technologies involved
in building and maintaining networks. Now we are going to discuss some more
concepts on Computer Networking.

58 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

11.2.4 Types of Computer Network Architecture

– Client-Server Architecture: Client-Server Architecture is a type of Com-


puter Network Architecture in which Nodes can be Servers or Clients. Here,
the server node can manage the Client Node Behaviour.

– Peer-to-Peer Architecture: In P2P (Peer-to-Peer) Architecture, there is


not any concept of a Central Server. Each device is free for working as either
client or server.

11.2.5 Summary

Networking involve attending events,conferences ,and using online platforms like


Linkedin.Effective networking can lead to collaborations job offers and valuable
insights.

Mailing often referred to as email communication,is a crucial tool for professional


and personal correspondence. It offers quick and efficient communication allowing
individuals to share information, documents and updates. To ensure effective email-
ing,uses clear and concise subject lines, and overloading recipients with excessive
messages.

59 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Chapter 12

Conclusion

The duration of the internship, we were exposed to a wide array of subjects that
collectively enriched our understanding and skill set. Under the guidance of expe-
rienced professionals, we delved into the fundamental concepts of C programming,
equipping us with a comprehensive grasp of its principles and real-world applica-
tions. This foundational knowledge served as a springboard for exploring more
advanced topics.

We also delved into practical aspects, such as data manipulation with arrays and
strings, the intricate world of memory management using pointers, and the essential
art of file handling for persistent data storage. Additionally, our hands-on experience
with Microsoft Office tools enhanced our ability to create and present content effec-
tively. Lastly, the significance of networking and mailing was highlighted, giving us
insight into the seamless communication and information sharing crucial in today’s
interconnected world. These diverse insights collectively broadened our horizons
and positioned us for future success in programming and beyond..

60 Dept. Of CSE, MH Halli


Fundamentals of C Programming Language and MS Office 2022-23

Bibliography

[1] References:

– Tutorials point

– Geeks for Geeks :https://www.geeksforgeeks.org/ -sample project for Ex-


ample

– W3 Schools : www.w3schools.com -All important topics covered from this


website

– Microsoft Bing Chat: https://microsoft.com

– ANCI C E.BALAGURUSAMY

61 Dept. Of CSE, MH Halli

You might also like