The Tutor is Yours!

Architecture of Computer Network

The architecture of the computer network describes how the computers are organized in the network and how the tasks or activities are allocated to all the connected computers.

The computer network architecture gives a complete overview of the established network with a detailed view of all the resources. It illustrates the physical and logical layout of the  hardware, protocols, software, and the transmission media of the data to be transmitted. 

Following are the two most widely used types of network architecture:
1. Peer-to-Peer Network Architecture
2. Client/Server Architecture

Peer-to-Peer Network Architecture

It is a network architecture that connects multiple computers together via the internet. All the connected computers in this architecture share the same resources and have equal capabilities and responsibilities.  

In this type of network architecture, activities are allocated among all the clients or computers of the network. Each client or machine associated with this network act as a server, so there is no dedicated central server for file storing.

This type of network architecture is useful in different areas such as education, military, business, etc for file sharing, voice communication, and instant messaging. 
Peer-to-Peer network is often called P2P architecture. Following are some examples of Peer-to-Peer network architecture:
1. Napster
2. Skype
3. Bitcoin 
4. Bit Torrent 
5. LimeWire, etc. 

Advantages of Peer-to-Peer Network Architecture

Following are the advantages of Peer-to-Peer (P2P) network architecture:
1. One of the main advantages of this network architecture is that it is cost-effective because it does not require any dedicated central server. That's why it is cheaper and affordable. 
2. In this network architecture, if any computer fails and stops working, then the other computers are not affected and they will continue working. 
3. This network architecture is flexible because the new clients can be easily configured.  
4. It does not require any network administrator for maintaining the complete network.
5. This architecture of networking is very easy to set-up and manage the network.

Disadvantages of Peer-to-Peer Network Architecture

Following are the disadvantages of Peer-to-Peer (P2P) network architecture: 
1. This network architecture does not contain any centralized server. So, it is hard to take the backup of data as the data is stored in different locations in the network. 
2. Another disadvantage of this architecture is security. Security is very less because each computer performs its tasks independently and contains its own data.  

Client/Server Network Architecture

It is a network architecture which allows multiple end-users (clients) to request and receive the services from the centralized server. 
In this networking architecture, clients request the services of the server to use, and the server waits for the request to receive from the client and then replies to the client. 

The server is the heart of the client/server network which maintains the major operations of the network and provides resources or services to any client according to the client's request. The server also helps to communicate among all the clients of the same network. 

For example, if any client machine wants to transfer its data to another client machine on the same network, then it has to send the request to the server first for taking permission. Then, the server initiates the communication between both the clients and allows the clients for sharing the data.  

Following are four examples of Client/Server network architecture:
1. Webserver
2. File server
3. Domain Name Server (DNS)
4. Mail server

Advantages of Client/Server Network Architecture

Following are the advantages of Client/Server network architecture:
1. This network architecture is simple to install and manage. 
2. It is the perfect network management architecture to keep all the data safe. Any user can easily find the data because the data is stored centrally. 
3. As compared to the peer-to-peer network, this architecture of the network provides high security. 
4. This network architecture has a centralized server which stores the data shared on the network. So, it is easy to take the backup of data as the data is stored in one place. 
5. The performance of this network architecture is good because of the dedicated centralized server. 
6. This network architecture also extends the speed of sharing resources among the client machines. 

Disadvantages of Client/Server Network Architecture

Following are the disadvantages of Client/Server network architecture:
1. As there is a need for a large server and various networking devices such as a switch, hub, router, and modem. So, the cost of this architecture is high. And, it is not affordable for normal users. 
2. This type of network architecture requires an experienced network administrator for maintaining all the resources on the network and the server. 
3. If the centralized server gets fails, then the whole network will be affected. 

Components of Computer Network

The components of the computer network are the various software and hardware resources which are used for constructing the network at organizations as well as homes.

Following are the various components which are used to construct a network:
1. Client
2. Server
3. Transmission Media
4. NIC
5. Protocol
6. Network Operating System
7. Local Operating System
8. Hub 
9. Switch
10. Router 
11. Modem
12. Bridge
13. Repeater 
14. Gateway 


Clients are the computers or machines which communicate with the other clients or to the main server in the network. 
These machines send the request to the server and receive some services from the server for accessing and using the shared network resources. 


A server is a machine with a high configuration which stores all the data and information shared on the network in one place. This machine allows the clients to use network resources over the network.
The server receives the request from the client and serves the services according to the client's request.
There are various types of the server such as fax server, file server, mail server, web server, and communication server, which provide their multiple functions. 

Transmission Media

Transmission media is an important component of the computer network because without it network devices cannot work until they are connected to each other. 
Transmission media are the channels which carry data and information from one network device to another network device. In networking, transmission media consists of guided and unguided transmission media. 
Guided transmission media consists following type of cables for transmitting the data from one device to another over the network:
1. Twisted Pair cable
2. Co-axial Cable
3. Fibre Optic cable

Unguided transmission media consists following type of electromagnetic waves for transmitting the data from one device to another over the network:
1. Radio waves
2. Micro waves
3. Infrared waves


NIC is an abbreviation of the Network Interface Card. It is an essential hardware component that connects multiple computers for communication over the network. 
A network interface card is available in all the computers of a network which formats, receives, sends the data, and controls the data flow between the network and the computer. 

NIC is categorized into the following two types:
1. Wired NIC: This type of NIC is present in the motherboard and uses the cables and connectors as a medium for transmitting the data. 

2. Wireless NIC: This type of NIC contains the antenna to establish a connection over the wireless network. 


A protocol is a set of defined rules which are followed by each client of the network for data transmitting between two entities. Following are some common network protocols used for  networking:
1. IP (Internet Protocol),
2. TCP (Transfer Control Protocol),
3. UDP (User Datagram Protocol),
4. FTP (File Transfer Protocol),
5. SMTP (Simple Mail Transfer Protocol), etc. 

Network Operating system

Network Operating System is an operating system that is mainly designed only for the network systems. It is basically installed on clients and servers and allows the clients to share data, files, printers, applications, etc. over the network. 

Local Operating system

Local Operating System is an operating system that allows the users to access files and CD drives located on personal computers. It also allows printing the documents on a local printer. 


Hub is a hardware component or device of the computer network which splits the large network connection into small multiple workstations or computers. This networking device acts as a distribution center on the physical layer of the OSI model. 
When a client machine requests any information from the network or other specific client computer then the hub is the first device that receives the request via cable. And, then the hub transmits that request to the entire network. 


A switch is a small hardware component or device which is used in wired networks. It is like as a hub, it does not broadcast the message or request to the entire network, but it analyses the port to whom the request is to be transferred. As compared to the hub, it is built with more advanced features. 
This hardware component uses the physical addresses in each incoming request so that it can transfer the request to the correct port or destination. 
Due to the direct connection of source and destination, switch devices increase the speed of the network. 


A router is a device which allows users to share data, information, and resources between the connected multiple client computers of the different network. It performs all its functions in the third (network) layer of the OSI model. 
Routers are used to receive and analyze the data packets and it also forwards the received data packets to another network. It forwards the packets to another network on the basis of information available in the routing table. 


Modem means modulator-demodulator. It is a hardware component that uses the existing telephone line for connecting the computer to the internet. 
In computer networking, it transfers the digital data from one computer terminal to another computer terminal through a telephone network. There are two types of modem in a computer network:
1. Ethernet modem
2. Wireless modem


A bridge is a hardware device which interconnects the multiple local networks working on the same protocol. It provides data communication between the devices of connected multiple local networks. 
Bridge performs all its functions in the data link layer of the OSI model. Network administrators also used this hardware device for splitting the larger network into the small various networks. 


A repeater is a communication component of the computer network which regenerates the incoming signals over the same network before the signals become too weak. 
The main aim of the repeater is to extend the transmissions so that the signals easily cover the longer distance in the same network. Repeater performs all its tasks in the physical layer of the OSI model.   
A repeater is a two-port hardware device that connects the two segments of the network cable. 
Many repeater devices are used in wide area networks (WANs). 


Gateway is a special hardware component which acts as a gate between the two networks of different networking models. 
Gateway is a hardware device which performs all its tasks on the transport, session, application, and transport layer of the OSI reference model. It manages all the data that enter and exit from the network.
This hardware device is more complex than the switch or router hardware device because it uses more than one communication protocol. This device uses packet switching techniques for transferring information or data over the network.

Features of Computer Network

Let's understand each feature of the computer network one by one. 

1. Software and Hardware Sharing

Users can install the software applications on the main server, so the systems connected with the main server can easily access the installed applications centrally. 
So, there is no requirement to install software applications on every machine or system. As same as, the hardware can also be shared between the systems or machines. 

2. Data and File sharing

File Sharing and Data sharing is one of the major features provided by the computer network. 
This mechanism shares the confidential data, information, and files between the multiple systems which are connected via the guided (cables) or unguided (waves) transmission media. 

3. Performance

Computer network provides the fastest way of sharing knowledge and ideas over the network. The performance of the computer network is always related to the response time. 
If the computer network gives the minimum response time then the performance of the network is high.

4. Backup

As we all know that, all the software applications and files shared on the network are always stored in the central location (main server), therefore it is easy to take the backup of all lost or failed data.

5. Security 

It is another big characteristic provided by the computer network. 
Computer network specifies the powerful aspects of security in all the organizations because the data shared on the network should be safe from unauthorized users or hackers. 

6. Reliability

Computer networks are reliable because it provides alternative ways for data and file sharing between the systems in case of failure in the hardware or the case of connectivity problems. 
If there is any failure occurs in the network, then the recovery of data should be fast. 

7. Scalability 

A Computer network is scalable because it allows the users to add new devices to the existing network. 

Introduction to Computer Network

Here, we will learn about the definition, characteristics, uses, advantages, and disadvantages of Computer Network. 
These days, Computer Network has become an integral part of the business sector for professional tasks as well as personal tasks. The technologies of computer networks help the user to share information on the network and also allows them to communicate. 

What is a Computer Network?

Computer Network is a collection of two or more digital devices which are connected through communication channels. 
In networking, devices are connected by both wired or wireless media. The main objective of the computer network is to sharing of the resource among multiple digital devices. They also share operating systems or software on the remote systems. 
Computer Network also includes multiple devices such as routers, switches, hubs, and bridges which help to communicate between the two devices. These intermediate devices are known as Network devices.

The computers on the network may be connected through radio waves, cables, satellites, telephone lines, or infrared light beams. The nodes of the computer network are identified by the network addresses or hostnames.  

Characteristics of Computer Network

Following are the important characteristics of features of the Computer Network:
1. The main aim of the computer network is to sharing of resources from one digital device to another digital device. 
2. Files are saved at the centralized server. So, it is simple to keep the backup of all the files from the server. 
3. Computer network provides security which protects the data and information from unauthorized users.   
4. Computer networks are scalable which means that we can add new components or devices to the network. The adding of new devices or components increases the performance of the system. 

Uses of Computer Network

Following are the important uses of the Computer Network:
1. File and Resource Sharing: Computer Networks allow organizations to share resources and data files in a very effective way. 
Programs and software present in a computer are available to every other computer which are connected to the network. Network users can also share devices such as Scanners, printers, hard disks, CD-ROM drives, etc. 
2. Electronic Messaging: Email (Electronic-mail) is the most widely used network application which is used by millions of peoples for sending text messages, audios, videos, and photos to other people or group of people on this network.
3. E-Commerce: It is an important business which is doing with the consumers on the Internet. Computer network plays an important role in online transactions. Users and organizations can pay bills, sell, and buy items electronically.
4. Marketing and Sales: Marketing professionals use the computer network to exchange, analyze, and collect the data which is related to the customer needs. 
Sales application uses the computer network for providing teleshopping and online-reservation services. 
5. Server-Client model: In this model, the server is a powerful central computer that stores the data and is maintained by the system administrator. 
Clients are the simple machines that access the remote data stored in the server. 

Advantages of Computer Network

Following are the important advantages or pros of the Computer Network:
1. The main advantage of computer networking is that the files can easily be shared between the end-users. The users which are connected by the network can easily communicate by emails and instant messengers. 
2. Another big advantage is that the user can share their hardware and software resources in an organization. The computer network also helps people to share the scanners and printers.  
3. It helps the peoples to share the information at a very fast speed.
4. Computer networking boosts the capacity of the storage. 
5. As compared to the single machine multiple interconnected computers work at a fast speed and solve the problem instantly. 

Disadvantages of Computer Network

Following are the important disadvantages or cons of the Computer Network:
1. The main disadvantage of the computer network is that the amount of set-up the network including file servers, hardware, and networking cables is high. 
2. In the network, all the systems are connected to the main server. If the server fails then the system cannot be used in the future.
3. Viruses can spread easily to other computers because of the inter-connectivity of the multiple devices. If any computer on a network gets infected with malware then there is a high possibility for the remaining systems to gets infected too. 
4. One of the big disadvantages of computers connected to the network involves many security issues. For large networks such as WAN, hackers can easily access confidential data by using various specialized tools which are developed for this purpose. 

What is DBMS

Here, we will learn the definition, characteristics, advantages, and disadvantages of the Database Management System.  
Let's Begin!!!
Before learning about the DBMS, we must know about what is data, information, and database. So, firstly we are explaining about the data, information, and database. 

What is Data?

Data is the raw facts or figures which the user wants to share, store, and process. Or, we can say that it is a collection of real-world entities or objects which need to be processed. 
It is a raw material which is only accepted by the computer machine. The data can be exist in any form like text, picture, video, number, and bytes. Examples of data are: Age of a student, Marks scored by the student, Name of a student, Name of a city, etc. 

What is Information?

Information is a set of data, which is processed, organized, structured, or presented in such a way as to be useful or meaningful to the user who receives it. 
Examples of Information are: Percentage, Grade, and position of student, which are calculated by the given student's data. 

What is Database?

The Database is a collection of structured or non-structured related data. In simple words, we can say that it is a place where the data is actually stored. It stores the data in the form of tables, views, schema, reports, etc.
Following are the different type of databases:
  • Cloud Database
  • Centralization Database
  • Distributed Database
  • Graph Database
  • NoSQL Database
  • Object-Oriented Database
  • Operational Database
  • Relational Database

What is DBMS?

DBMS is an abbreviation of the Database Management System. Database Management System is system software which helps users for managing the data in the databases. It provides an interface to end-users for inserting, accessing, updating, and deleting the data in the database. This management system provides security and protection to the data in the databases. If there is more than one user uses the same database, then the system also maintains the consistency of the data. 
Some examples of DBMS are: Oracle, MS SQL Server, SQLite, dBase, MySQL, IBM DB2, Microsoft Access, etc. 

Characteristics of DBMS

 Following are some characteristics or features of DBMS:
  • It provides security to the data and removes the redundancy of the data. 
  • It provides multiple views of the same database for the different users.
  • This system offers physical and logical data independence. 
  • It also allows multiple users to work on the same database at the same time. 
  • The database system follows the ACID properties, which helps in handling the transactions. 
  • It allows users to store any type of data in the database. 
  • It also allows creating a relationship among tables which makes the data more useful and connected. 

Advantages of DBMS

Some of the advantages or benefits of Database Management System are discussed below:
1. Simple: This system provides a simple and logical view of data. We can easily implements the operations like insertion, updation, deletion on the data. 
2. Data Sharing: This management system allows data sharing between any number of users and application programs at the same time. Users can access the database from the remote locations and also share the data among themselves. 
3. Data Integrity: DBMS allows users to apply the integrity constraint on the data. By doing this, the system ensures that the stored data is correct and consistent. 
4. Reduction in Data Redundancy: In the database, there is no duplicacy of the same data due to the centralized control of data by the Database Administrator.
5. Data Independence: The database management system provides data independence, which means that the changes done at one level do not affec the other levels of the database. 
6. Data Security: The database Management system allows authorized users to access the database using their user name and password. It also provides privacy policies, which helps companies for improving data security. 
7. Backup and Recovery: Database systems automatically take care of backup and recovery. If the system crashes or failures, then it restores the data to its previous condition. 
8. Conflict Resolution: The Database Administrator (DBA) controls the database, so he/she should automatically resolve the conflicting requirements of various applications and users.  

Disadvantages of DBMS

DBMS provides lots of advantages. But with the advantages also have some disadvantages. The disadvantages or limitations of the Database Management System are discussed below:
1. Cost: It is the first and main disadvantage of the database management system. The cost of purchasing and developing the software is high. And, the cost of upgrading the hardware for storing the data is also high. Both the hardware and software require maintenance, whose cost is so high.
2. Large Size of DBMS: Due to the wide functionality of DBMS, it needs more space to run in the main memory and requires a large amount of disk space for storing the data. 
3. Efficiency is Low: Various software and application programs are made for only one problem. But, Database Management System is that software, which is used for many purposes, and due to this, its efficiency is low. 
4. Performance: The performance of the traditional file-based system was very good for small firms and some particular applications. But, the performance of DBMS for the small firms is not good, because the speed of this system is very slow. So, it is not good for small firms due to performance. 
5. Response is slow: As the database in the database system is centrally managed and accessed by multiple users online and offline. So, its response may be slow when multiple users access the same database. 

Computer Network Tutorial

Our Computer Network Tutorial provides the basic and advance concepts for both beginners and IT professionals.

We assure that you will not find any kind of problem with our Computer Network Tutorial. But if there is any mistake, we request you to post the problem in the contact form.

Before learning about the Computer Network, just look at its index which is given below:

Index of Computer Network

1. Introduction to Computer Network
2. Computer Network Features
3. Components  
4. Architecture
5. Types of Computer Network
6. Network Topologies
7. Transmission Modes
8. Security

9. Computer Network Models 
10. OSI Model
11. TCP/IP Model

OSI Model
12. Physical Layer  
13. Data Link Layer
14. Network Layer
15. Transport Layer
16. Session Layer
17. Presentation Layer 
18. Application Layer

Interview Questions
Interview Questions of Computer Network  

30 Basic C Interview Questions and Answers

Here, you will get important 30 Basic interview questions on C Programming in an easy language. This article provides the latest updated and repeatedly asked definitions & differences in the interviews of IT companies. 
These questions also help you to attempt the objective questions and the questions asked in the interviews.
Ques 1. What is C Language?
Ans. The C programming language is a simple, flexible, and structured programming language which was developed in 1972 by Dennis Ritchie at bell laboratories using the UNIX operating system.
This programming language is mainly used for developing desktop applications and operating systems. It also helps the programmers and developers for developing mobile operating systems. 
Ques 2. What are the features of the C programming language?
Ans. There are following some features or characteristics of the C programming language:
  • It is a simple programming language because it follows the structural design. 
  • C language is widely used in the Internet of Things (IoT) applications. 
  • It also allows developers to develop desktop and mobile operating systems.
  • It supports various predefined functions that make the fast development of applications and programs.
  • This language has the ability to extend itself. 
  • It provides the pointers, which allows users to directly interact with the memory.  

Ques 3. Why C is called the mother of all other languages?
Ans. C is called as mother language because most of the kernels and compilers are written in this language. 
And, most of the popular languages are designed with the help of the C programming language. That's why C is called the mother language

Ques 4. Why C language is called the middle-level language?
Ans. Because the developers use this language for developing system programming as well as application programming.
C language provides the features for both low-level language and high-level programming  language, that's why it is considered as middle-level level language. 

Ques 5. What is the difference between C and C++?
Ans. Following table describes the differences between C and C++ programming language:
C Programming Language       C++ Programming Language
1. C is a structural and procedural programming language.1. C++ is object-oriented programming. 
2. This language was introduced in 1972 by  Dennis Ritchie who was a great computer scientist. 2. This language was introduced in 1979 by Bjarne Stroustrup.  
3. The program of this language follows the top-down approach.3. The program of this language follows the bottom-up approach.
4. This programming language only supports the pointers.4. Whereas, this programming language supports the pointers as well as references.
5. C language does not allow its users to use the function overloading. 5. C++ language allows its users to use the function overloading because it is an OOPS concept. 
6. This programming language contains only 32 keywords. 6. This programming language contains 48 keywords. 
7. As it is a procedural programming language, so, the functions and data are separated from each other in C. 7. As it is an object programming language, so, the functions and data are combined in the object in C++. 
 8. This supports only built-in datatypes. 8. This supports built-in as well as predefined datatypes.

Ques 6. What is the purpose of scanf() and printf() in C language?
Ans. scanf() function is used for scanning the values entered by the user in the C program. On the other hand, the print() function is used for printing or displaying the value on the screen.  
Following are the four format specifiers used in printf() and scanf() function:
1. %d: It is an int type format specifier used for printing and scanning the integer values. 
2. %f: It is a float type format specifier used for printing and scanning the decimal values.  
3. %c: It is a char type format specifier used for printing and scanning the character values. 
4. %s: It is a string type format specifier used for printing and scanning the strings.

Ques 7. What is the difference between compiler and Interpreter?
Ans. Compiler: Compiler is a computer program which scans the entire code and translates the whole code into the machine code. 
It converts the high-level program into the computer understandable code before the execution of the program.
Error detection in the compiler is difficult.
C, C++, Java, C#, Scala are the programming languages which use the compiler. 

Translator: Translator is a computer program which translates only a single statement at a time. 
It converts the high-level program into the computer understandable code at the time of program execution. 
Error detection in the translator is easier as compared to the compiler.
Perl, PHP, Ruby are the programming languages which use the translator. 

Ques 8. What is the difference between assembler, compiler, and Interpreter?
Ans. Assembler: It is a computer program which converts low-level (assembly) language into machine understandable language. It contains the assembly language instructions for converting the low-level source code into code which is understandable by the computer. 
Compiler: It is a computer program which converts the whole source code written in a high-level language into the machine code. 
Interpreter: It is a computer program which converts the source code into the intermediate code and then each statement of intermediate code executes one by one.

Ques 9. What is the data type in C?
Ans. Data types in C programming language tell the C compiler what type of value is defined by the user in the variable. They also specify what type of value returned by the function. 

Ques 10. Enlist the basic data types supported by the C programming language?
Ans. Following are the four different types of basic data types in the C language:
  1. Int: This data type indicates the value is a number.
  2. Char: This data type indicates the value is character.
  3. Float: This data type indicates the double real number with single precision. 
  4. Double: This data type also indicates the real number but with double precision. 

Ques 11. Enlist the types of data type used in C language?
Ans. Names of four data type used in C programming language are as follows:
  1. Basic Data Type: (Int, Char, Float, Double) 
  2. Derived Data Type: (Array, Pointer, Structure, Union)
  3. Enumerated Data Type: (enum)
  4. Void Data Type: (void)

Ques 12. Enlist the Integer (int) data types with their size and range used in C language?
Ans. Following are the different Integer (int) data types used in C programming language:
Integer Type         Size        Range
 int  2 bytes  -32768 to 32767
 signed int;  2 bytes  -32768 to 32767
 unsigned int   2 bytes  0 to 65535
 short int  2 bytes  -32,767 to 32,767 
 signed short int  2 bytes  -32,767 to 32,767
 unsigned short int   2 bytes  0 to 65535
 long int     4 bytes  0 to 65,535
 signed long int 4 bytes   -2,147,483,648 to 2,147,483,647
 unsigned long int  4 bytes  0 to 4,294,967,295

Ques 13. Enlist the Float (float) data types with their size and range used in C language?
Ans. Following are the different Float (float) data types used in C programming language:
 Float Type     Size  Range
 float 4 bytes 1.2e-38 to 3.4e+38
 double 8 bytes 2.3e-308 to 1.7e+308
 long double 10 bytes 3.4e-4932 to 1.1e+4932

Ques 14. What is a variable in C?
Ans. Variable is nothing but a name given to the memory location that our C programs can manipulate. It is a term used for storing the integer, character, float, and string values which are given by the user. Its value can be changed at the time of program execution.  

Ques 15. What are the rules for declaring a variable in C?
Ans. Following are the specific rules which are necessary to be followed at the time of variable declaration:
1. A variable can be constructed by the digit, letter, and underscore.
2. The name of the variable begins with the letter and underscore, but not with the digit.
3. A variable cannot contain special symbols other than the underscore.
4. Users are not allowed to use the space within the variable name. 
5. A variable name must not be any keyword. 
6. _a12, v, a_12sk, etc are examples of the variable name.  

Ques 16. How to declare the variable in C?
Ans. Syntax for declaring the single variable in C programming language is:
  Data_type Variable_name;
int var;
char _ch;
float fvar;

Syntax for declaring the multiple variables in the single statement in C programming language is:
  Data_type Variable_name1, Variable_name2, Variable_name3, ......., Variable_nameN;
int var, a12, num2;
char character1, character2, character3;
float f1, f2, f3; 

Ques 17. What is variable initialization and how to initialize the variable in C?
Ans. Variable initialization is the process where the variable is first declared before its use in the C program. Or, we can say that it is a part where the memory location and the value is assigned to the variable. Users can also declare and initialize the variable in a single statement. 

Syntax for declaring and initializing the variable together: 
  Data_type Variable_name = value;
int a = 10;
float fnum = 20.5;
char gender = 'M';

Syntax for declaring the multiple variable and intializing them in a single statement: 
  Data_type Variable_name1 = value, variable_name2 = value, ....., variable_nameN = value;
int num1=10, num2 = 50, num3 = 60;
float f1 = 20.68, f2 = 100.98;
char c1 = 'a', c2 = 'x';   

Ques 18. Name the different types of variables in the C programming language?
Ans. Following are the different types of variable in the C programming language:
1. Local variable 
2. Global variable 
3. Automatic variable 
4. Static variable 
5. External variable. 

Ques 19. What is the static variable in C?
Ans. A static variable is that variable in C which is declared with the static keyword. A static variable is defined only once in the C program and preserves its value even after they exit the scope. Zero is the default value for the static variables. 
Syntax of Static variable in C:
 Static Data_type Variable_name = value;
static int number = 10; 

Ques 20. What is the external variable in C?
Ans. An external variable is that variable in C programming, which is defined outside any function body. In the C programs, we need to use the extern keyword to declare the external variable. 

Ques 21. What is the use of the static variable in C?
Ans. The uses of the static variable in C are as follows:
1. Static variables preserve their value between more than one function calls. 
2. The value of the static variable is shared as common for all the methods. 
3. These variables are defined only once to minimize memory usage. 

Ques 22. What is the scope of the variable?
Ans. Scope of the variable is that part or area of the C program where the user directly uses the variable after its declaration.

Ques 23. What is the pointer in C?
Ans. Pointers in C are used to specify the location in the memory. A pointer is a variable which stores or holds the address of another C variable.  
The pointers in C are declared using the asterisk(*) symbol. This symbol shows that the variable is a pointer which holds the address of another variable.
Syntax of Pointer:
 Data type *variable;
int *p; // This statement defines the pointer to integer (int) type. 
char *r1; // This statement defines the pointer to character (char) type. 

Ques 24. What are the keywords in C?
Ans. Keywords in C are the reserved or predefined words which have a special meaning for the compiler. In the C language, users cannot use any keyword as the constant and variable name. C programming language consists of 32 keywords and all the keywords must be written in lowercase in the C programs because C is a case-sensitive language.  

Ques 25. Enlist all the keywords of C programming language?
Ans. There are 32 keywords in the C programming language which are given in the following table: 
 auto                 break       case       char       
 const         continue    default       do
 int long register return
 short signed  sizeof  static 
 struct switch     typedef  union     
 unsigned void   volatile  while 
 double   else   enum  extern
 float  for goto if 

Ques 26. What is an auto keyword in C?
Ans. Auto keyword in C is optional. Any variable which is declared inside the block is known as an automatic or auto variable. Auto variables are also known as local variables. 

Ques 27. What is an operator in C?
Ans. An operator in C programming language is a mathematical or special symbol which tells the compiler for performing the logical operations and mathematical calculations. 
Following are the various types of operators in the C programming language:
1. Arithmetic Operators
2. Logical Operators
3. Relational Operators
4. Conditional Operator
5. Bitwise Operators
6. Assignment Operator
7. Ternary Operator
8. Special Operators

Ques 28. What is a ternary operator in C?
Ans. The ternary operator is an operator in C, which uses three operands for performing the conditional statements. It takes three operands, that's why it is called a ternary operator. This operator is also termed as the conditional operator. 
This type of operator uses two symbols '?' and ':'. 
Syntax of Ternary operator:
 Expression1 ? Expression2 : Expression3 
This operator is evaluated as: If the expression1 is true, then the expression2 executes  otherwise 
expression3 executes. 
Example of Ternary Operator:

 int main()  
    int a;  
    printf("Enter a number");  
   (number>=100)? (printf("Hello India.....")) : (printf("Hello World....."));   // This statement contains        ternary operator
    return 0;  

Ques 29. What is the modulus operator?
Ans. Modulus operator is that operator which divides the two specified values and provides the remainder as an output of the specified two operand or values. The modulus operator is indicated by the percentage (%) sign.    
Syntax of Modulus operator:
 result = Value1  % Value2;
20 % 6
According to the modulus operator, the output of this example is 2.

Ques 30. What is a function in C?
Ans. The functions in C language are the collection of C statements which take input and perform some operations and return a meaningful output. Functions make the C program easier to use and understand. Functions reduce the code size and help the users in an easy way for debugging the code.
In C language, every program has a function which is main().  

Example of Function in C

 void multiply();  
 void main()  
    printf("\nThis program uses the function for calculating the multiplication of two numbers:");  
 void multiply()  
    int x,y;   
    printf("\nEnter two numbers");  
    scanf("%d %d",&x,&y);   
    printf("The multiplication of %d and %d is %d",x,y,x*y);