2072 computer science questions:
Group “A”
Long Answer questions 4x10=40
Attempts any Four questions:
1.Differentiate between “while” and “do-while” loop. Write a program to display first 10 even numbers.5+5
Ans:-
while loop | do while loop |
In the while loop, condition is checked in the beginning. | In the do while loop, condition is checked at the end. |
It is also known as a pre-test or entry control loop. | It is also known as post-test or exit control loop. |
It is not terminated with a semicolon. | It is terminated with a semicolon. |
In the while loop, statements are not executed if the condition is false. | In the do while loop, statements are executed once even the condition is false. |
It uses the keyword ‘while’. | It uses two keywords ‘do’ and ‘while’. |
The syntax of while loop is as follows: initialization; while(condition) { statements; increment/decrement; } | The syntax of do-while loop is as follows: initialization; do { statements; increment/decrement; }while(condition); |
The operation of while loop can be represented using flowchart as follows: | The operation of do while loop can be represented using flowchart as follows: |
Example: int main() { int i=1; while(i>=10) { printf("I love my country"); i++; } return 0; } Output: This program displays nothing as output; as condition is evaluated false in the beginning. | Example: #include<stdio.h> int main() { int i=1; do { printf("I love my country"); i++; }while(i>=10); return 0; } Output: This program displays “I love my country” as output at once. |
second part:-
Ans:-
Array:-
Declaration of Array:
datatype array_name [size];
Example: - int marks [10]; int x[4]={1,2,3,4};
Array size is fixed at the time of array declaration.
Generally, we use for loop () to assign data or item in memory and also use this loop to extract data from memory location.
Types of Array:
There are 2 types of array.
a) One Dimensional Array (1-D): IT is an array where we use one subscript value.It stores value in row in contigous cells.
b) Two Dimensional Array (2-D):an array where we may use two or more than two subscript values.
| Column zero | Column one |
Row 0 Ã | 1(0,0) | 2(0,1) |
Row 1Ã | 3(1,0) | 4(1,1) |
Ans:-
1. Function Declaration (Function Prototype)
2. Function Call
3. Function Definition
For example,
#include <stdio.h>
int sum();
int main()
{
sum();
return 0;
}
int sum()
{
int num1,num2;
}
4.What is string? Describe any four string handling functions with examples.2+8
Ans:-
It means series of characters used in our program. We can also use digits with characters. They also act as string or a part of it. It is used when we input our name or address or somewhere their combination.
Syntax
char identifier[value];
or char identifier[value][value];
We can use he upper one if we want to input single string then. And if we want to input multiple values then we use lower one(called 2-dimensional array in string).
For example,
char name[100];
gets(name)
Here, the variable accepts value having maximum characters 100. We can also write ,
char name[10]="kathmandu";
IT stores the value in following way.
It stores values from cell location '0' and ends at null character called escape sequence. This is used to show that there is no more character beyond that. This null character is used with strings only. For numbers, it is not used.
Similarly, if we want to store multiple string with same name then one-dimensional is not applicable. We use two dimensional string.
We declare:
char name[5][50];
It means, we are going to store any five names having optimum 50 characters.
Let's look below. If we have five names :RAM,SHYAM,Nita then it would like
so sequentially it stores data in different row. We use loop to execute it with different data.
Or, instead of inputting string, if we initialize strings then it can be written as
char name[5][50]={"RAM","Shyam","Nitu"};
second part:-
syntax:
identifer=strlen(string);
For example,
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="apple";
int k;
k=strlen(string);
printf("length=%d",k);
}
It returns 5. It also counts white spaces present in a string.
If we want want , we can also input string using scanf() or gets().
2)strrev():- It reverses the string given by us.
syntax:- strrev(string);
example:
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="apple";
printf("reverseed string=%s",strrev(string));
}
We get output "elppa". Instead of putting in output line, we can put it before printf.
3)strlwr(): This function is used to convert given string into lower case.
syntax:-
strlwr(string);
Example;
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="APPLE";
printf("string in lowercase=%s",strlwr(string));
}
It gives us "apple" as an output.
4)strupr():This string function is used to convert all characters of string into upper case.
syntax:
strupr(string);
example:-
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="apple";
printf("string in uppercase=%s",strupr(string));
}
Ans:-
Group “B”
Short Answer questions 7x5=35
Attempts any Seven questions:
6.What is feasibility study? Explain different levels of feasibility study.2+3
Ans:-
It has following types.
Ans:-
Some of the major benefits include the following :
- Greater overall database organization
- Reduction of redundant data
- Data consistency within the database
- A much more flexible database design
- A better handle on database security
- Fewer indexes per table ensures faster maintenance tasks (index rebuilds).
Also realizes the option of joining only the tables that are needed.
8.What is computer network? Write the advantages and disadvantages of computer network.1+4
Ans:-
A computer network, often simply referred to as a network, is a collection of computers and devices connected by communications channels that facilitates communications among users and allows users to share resources with other users. Networks may be classified according to a wide variety of characteristics.
Purpose of networking:-
Networking for communication medium (have communication among people;internal or external)
Resource sharing (files, printers, hard drives, cd-rom/)
Higher reliability ( to support a computer by another if that computer is down)
Higher flexibility( different system can be connected without any problems)
- Sharing devices such as printers saves money.
- Site (software) licences are likely to be cheaper than buying several standalone licences.
- Files can easily be shared between users.
- Network users can communicate by email and instant messenger.
- Security is good - users cannot see other users' files unlike on stand-alone machines.
- Data is easy to backup as all the data is stored on the file server.
1.Purchasing the network cabling and file servers can be expensive.
2.Managing a large network is complicated, requires training and a network manager usually needs to be employed.
3.If the file server breaks down the files on the file server become inaccessible. Email might still work if it is on a separate server. The computers can still be used but are isolated.
4.Viruses can spread to other computers throughout a computer network.
5.There is a danger of hacking, particularly with wide area networks. Security procedures are needed to prevent such abuse, eg a firewall.
9.What is E-R diagram? Explain the advantages of E-R diagram in system design.1+4
Ans:-
The Entity-Relationship (E-R) data model is based on a perception of a real world that consists of a collection of basic objects, called entities, and of relationships among these objects. An entity is a “thing” or “object” in the real world that is distinguishable from other objects. For example, each person is an entity, and bank accounts can be considered as entities.
Entities are described in a database by a set of attributes. For example, the attributes account-number and balance may describe one particular account in a bank, and they form attributes of the account entity set. Similarly, attributes customer-name, customer-street address and customer-city may describe a customer entity.
A relationship is an association among several entities. For example, a depositor relationship associates a customer with each account that she has. The set of all entities of the same type and the set of all relationships of the same type are termed an entity set and relationship set, respectively.
The overall logical structure (schema) of a database can be expressed graphically by an E-R diagram, which is built up from the following components:
Advantages:-
- Exceptional conceptual simplicity.
- Visual representation.
- Effective communication tool.
- Integrated with the relational database model.
Ans:-
Variable
Type |
Keyword |
Storage Size |
Range |
Character |
char |
1 byte |
-128 to 127 |
Unsigned character |
unsigned char |
1 byte |
0 to 255 |
Integer |
int |
2 byte |
-32768 to 32767 |
Short integer |
short int |
2 byte |
-32768 to 32767 |
Long integer |
long int |
4 byte |
-2,147,483,648 to 2,147,483,647 |
Unsigned integer |
unsigned int |
2 byte |
0 to 65535 |
Unsigned short integer |
unsigned short int |
2 byte |
0 to 65535 |
Unsigned Long integer |
unsigned long int |
4 byte |
0 to 4,294,967,925 |
Float |
float |
4 byte |
1.2 E-38 to 3.4E+38 |
Double |
double |
8 byte |
2.2E-308 to 1.7 E+308 |
Long double |
long double |
10 byte |
3.4 E-4932 to 1.1 E+308 |
11.What is multimedia? Explain.5
Ans:-
2)Multimedia in Entertainment: Computer graphics techniques are now commonly use in making movies and games. this increase the growth of multimedia.
3)Movies: Multimedia used in movies gives a special audio and video effect. Today multimedia has totally changed the art of making movies in the world. Difficult effect, action are only possible through multimedia.
Accessibility
Multimedia requires electricity to be operated, which may not be available in some rural areas or may not be consistently available due to shortages and blackouts.
Distracting
Mulitimedia may take away the focus from the lesson due to its attention-grabbing formats.
Costly
Production of multimedia is more expensive than others because it is made up of more than one medium.Production of multimedia requires an electronic device, which may be relatively expensive.
Multimedia requires electricity to run, which adds to the cost of its use.
12.What is AI? What are the uses of AI? 2+3
Define the terms e-business and e-learning.2.5+2.5
Ans:-
1.24/7 Availability
2.Global Reach
Disadvantages:-
1.Innovation Pressure
2.Cost and Shipping
.
13.Write the importance of SDLC?5
Ans:-
SDLC is a structure or a process to develop a software followed by a development team within the software organization. It consists of a detailed plan describing how to develop, maintain and replace specific software. SDLC is also known as information systems development or application development. It is life cycle defining a methodology for improving the quality of software and the overall development process.
Why SDLC/its importance:-
When business organization facing a keen competition in the market, rapid change of technology and fast internal demand, system development is necessary. In the system development, a business organization could adopt the systematic method for such development. Most popular system development method is system development life cycle (SDLC) which supports the business priorities of the organization, solves the identified problem, and fits within the existing organizational structure. And obviously software can be very difficult and complex. We need the SDLC as a framework to guide the development to make it more systematic and efficient
In summarized form we can say following reasons for SDLC.
I. To create a better interface between the user and the system.
II. For good accuracy and speed of processing.
III. High security and backup of data used in system.
IV. Sharing of data all over the world in very less and real time.
V. new laws that force organizations to do new things, or do old things differently
VI. changes in society, such as growing demand for better security over personal data
VII. a desire to improve competitiveness in the fact of reducing profits and market share
14.What is MS-Access? what are the uses of MS-Access? 2+3What are the advantages of RDBMS.5
Ans:-
15.Write short notes on :
a) Satellite b) System Security
- In the context of spaceflight, a satellite is an object which has been placed into orbit by human endeavor. Such objects are sometimes called artificial satellites to distinguish them from natural satellites such as the Moon.
- Satellites are usually semi-independent computer-controlled systems. Satellite subsystems attend many tasks, such as power generation, thermal control, telemetry, altitude control and orbit control
- satellite has on board computer to control and monitor system.
- Additionally, it has radio antennae (receiver and transmitter) with which it can communicate with ground crew.
- Most of the satellites have attitude control system(ACS).It keeps the satellite in right direction.
- Common types include military and civilian Earth observation satellites, communications satellites, navigation satellites, weather satellites, and research satellites. Space stations and human spacecraft in orbit are also satellites.
- Satellite orbits vary greatly, depending on the purpose of the satellite, and are classified in a number of ways. Well-known (overlapping) classes include low Earth orbit, polar orbit, and geostationary orbit.
Some common cyber attacks done to harm our server/computers:
2.Denial of Service
3.Backdoor attack
4.Direct Access Attack
Set B
----------
HSEB-GRADE XII -2072(2015)
Computer Science [230-D]
Time: 3 hrs Full Marks : 75
Pass Marks: 27
Group “A”
Long Answer questions 4x10=40
Attempts any Four questions:
1.
Ans:-
for(initialization;condition;increment/decrement )
{
statements;
}
int main()
{
int i;
for(i=1;i<=20;i++)
{
printf("%d,",i);
}
return 0;
}
Output:
If we execute this we will get 1,2,3....20
Definition:-
It executes the program statements repeatedly until the given condition is true. It checks the condition at first; if it is found true then it executes the statements written in its body part otherwise it just gets out of the loop structure. It is also known as entry control or pre-test loop.Syntax of while Loop:
initialization;
while(condition)
{
statements;
increment/decrement;
}
Where initialization means starting point, control means stopping points and increment/decrement means counter.
Flowchart:-
Examaple:
#include<stdio.h>
int main()
{
int i=1;
while(i<=20)
{
printf("%d,",i);
i=i+1;
}
return 0;
}
Output:
If we execute this we will get 1,2,3....20
Ans:-
#include<stdio.h>
#include<conio.h>
void main()
{
int x;
printf("enter a number\n");
scanf("%d",&x);
if(x%2==0)
{
printf("it is an even number");
}
else
{
printf("it is an odd number\n");
}
getch();
}
2.Describe any five string handling functions with examples.10
Ans:-
The strcat() function is used to join or concatenate one string into another string.
Syntax:
strcat(strl,str2);
where str1,str2 are two strings. The content of string str2 is concatenated with string str1.
#include <stdio.h>
#include<string.h>
int main()
{
char str1[100],str2[100];
printf("Enter two strings = ");
scanf("%s%s",str1,str2);
strcat(str1,str2);
printf("After copying the string is %s ", str1);
return 0;
}
Syntax:-
strcpy(string1,string2);
or strcpy(destination,source);
When we copy string, this is done from source to destination (string2 to string1). If first is empty then there would not be over-writing.
Example;
#include<stdio.h>
#include<string.h>
void main()
{
char string1[100]="APPLE";
char string2[100]="grapes";
printf("copied string =%s",strcpy(string1,string2));
}
output-
We get here string1=grapes. Because 'grapes' is copied to firs string named "APPLE". We can also write in reverse order.
Syntax:
v=strcmp(strl,str2);
Where, str1 and str2 are two strings to be compared and v is a value returned by the function which is either zero(equal), positive value(descending) or negative value(ascending).
#include <stdio.h>
#include<string.h>
int main()
{
char str1[50],str2[50];
printf("Enter two strings : ");
scanf("%s%s",str1,str2);
int v=strcmp(str1,str2);
if(v==0)
printf("Both strings are same and have same ASCII value");
else if(v>0)
printf("%s comes after %s or %s has more ASCII value than %s",str1,str2,str1,str2);
else
printf("%s comes before %s or %s has more ASCII value than %s",str2,str1,str2,str1);
return 0;
}
syntax:
identifer=strlen(string);
For example,
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="apple";
int k;
k=strlen(string);
printf("length=%d",k);
}
It returns 5. It also counts white spaces present in a string.
If we want want , we can also input string using scanf() or gets().
It reverses the string given by us.
syntax:- strrev(string);
example:
#include<stdio.h>
#include<string.h>
void main()
{
char string[100]="apple";
printf("reverseed string=%s",strrev(string));
}
We get output "elppa". Instead of putting in output line, we can put it before printf.
Ans:-
Declaration of Array:
datatype array_name [size];
Example: - int marks [10]; int x[4]={1,2,3,4};
Array size is fixed at the time of array declaration.
Generally, we use for loop () to assign data or item in memory and also use this loop to extract data from memory location.
Types of Array:
There are 2 types of array.
a) One Dimensional Array (1-D): IT is an array where we use one subscript value.It stores value in row in contigous cells.
b) Two Dimensional Array (2-D):an array where we may use two or more than two subscript values.
| Column zero | Column one |
Row 0 Ã | 1(0,0) | 2(0,1) |
Row 1Ã | 3(1,0) | 4(1,1) |
a) Differentiate between structure and union.2.5+2.5
Ans:-
struct | Union |
1.It stores dis-similar data.Each gets separate space in memory.They do not share memory | 1. It stores dis-similar type of data.Total memory space is equal to the member with largest size.They share memory space. |
2.we can access member in any sequence . | 2.We can access that whose value is recently used. |
3.It uses keyword 'struct' | 3.It uses keyword 'union' |
4.We can initialize values of member/s and in any order | 4.We can initialize that member which is first declared. |
5.It consumes more memory | 5.It consumes less memory. |
6.Its syntax struct tag { datatype member1; datatype member2; datatype member3; }variable; | 6.Its syntax union tag { datatype member1; datatype member2; datatype member3; }variable; |
Example struct student { int roll; char sex; float percentage; }var; | Example union student { int roll; char sex; float percentage; }var; |
Ans:-
5.
a) Describe any two file handling functions.2.5+2.5
Ans:-
syntax:-
syntax:-
Ans:-
Group “B”
Short Answer questions 7x5=35
Attempts any Seven questions:
6.Describe the components of feasibility study.5
Ans:-
7.Who is system analyst? List out the characteristics of system analyst.1+4
Ans:-
- verbal communication
- non-verbal communication
- listening skills
- problem solving
- decision making
- assertiveness (Communicating our values, ideas, beliefs, opinions, needs and wants freely.
8.Describe system flowchart with diagram.5
Ans:-
A very powerful tool which is used to depict the algorithm diagrammatically. Or graphical representation of algorithm is called flowchart. A flowchart can show and give us a bird eye view of algorithm. We can understand easily what an algorithm willing to say. While designing or drawing flowchart, we use many symbols like:
Advantages:
1. Good means of communication.
2. Effective analysis
3. As Documentation tool
4. Helps in debugging process.
Disadvantages”
1. Time consuming.
2. More space consuming
3.Difficult to maintain
eg. 1. to get sum of two numbers.
9.What is networking? List the advantages if networking.1+4
Ans:-
A computer network, often simply referred to as a network, is a collection of computers and devices connected by communications channels that facilitates communications among users and allows users to share resources with other users. Networks may be classified according to a wide variety of characteristics.
Purpose of networking:-
Networking for communication medium (have communication among people;internal or external)
Resource sharing (files, printers, hard drives, cd-rom/)
Higher reliability ( to support a computer by another if that computer is down)
Higher flexibility( different system can be connected without any problems)
- E-mail (to send or get mails electronically worldwide)
- Scheduling programs and having meetings at same time across world.
- Video conferencing with sound without delay.
- teleconferencing for people.
- Automate banking facility
- to surf Internet facility
- telecommuting to work at home by accessing remote computer
- doing business and marketing
10.Describe any two database model with diagram.5
Ans:-
Three key terms are used extensively in relational database models: relations, attributes, and domains. A relation is a table with columns and rows. The named columns of the relation are called attributes, and the domain is the set of values the attributes are allowed to take.
The basic data structure of the relational model is the table, where information about a particular entity is represented in columns and rows. Thus, the "relation" in "relational database" refers to the various tables in the database; a relation is a set of tuples.So,
Relational databases
Data is organized into two-dimensional tables, or relations
Each row is a tuple (record) and each column is an attribute (field)
A common field appears in more than one table and is used to establish relationships
Because of its power and flexibility, the relational database model is the predominant design approach
In this table we have used different concept like field (each column),record (each row). Each row gives us a complete information. If we have many tables then we relate them for data extractions,this is called relationship between tables.Apart from these, we also use other concept like,primary key,foreign key,Entity etc.
E-R model(E-R diagram):
The Entity-Relationship (E-R) data model is based on a perception of a real world that consists of a collection of basic objects, called entities, and of relationships among these objects. An entity is a “thing” or “object” in the real world that is distinguishable from other objects. For example, each person is an entity, and bank accounts can be considered as entities.
Entities are described in a database by a set of attributes. For example, the attributes account-number and balance may describe one particular account in a bank, and they form attributes of the account entity set. Similarly, attributes customer-name, customer-street address and customer-city may describe a customer entity.
A relationship is an association among several entities. For example, a depositor relationship associates a customer with each account that she has. The set of all entities of the same type and the set of all relationships of the same type are termed an entity set and relationship set, respectively.
The overall logical structure (schema) of a database can be expressed graphically by an E-R diagram, which is built up from the following components:
Rectangles, which represent entity sets
Ellipses, which represent attributes.
Diamonds, which represent relationships among entity sets.
Lines, which link attributes to entity sets and entity sets to relationships.
for example,
1)
11.Describe network topologies with diagram.5
Ans:-
star topology:
Data on a star network passes through the hub, switch, or concentrator before continuing to its destination. The hub, switch, or concentrator manages and controls all functions of the network.
It also acts as a repeater for the data flow. This configuration is common with twisted pair cable; however, it can also be used with coaxial cable or fiber optic cable.
Fig. 2. Star topology
Advantages of a Star Topology
Easy to install and wire.
No disruptions to the network when connecting or removing devices.
Easy to detect faults and to remove parts.
Disadvantages of a Star Topology
Requires more cable length than a linear topology.
If the hub, switch, or concentrator fails, nodes attached are disabled.
- Reduced chances of data collision as each node release a data packet after receiving the token.
- Token passing makes ring topology perform better than bus topology under heavy traffic.
- No need of server to control connectivity among the nodes.10. Describe the wireless network system. List out deices and equipment necessary for Wi-Fi network. 3+2
12.What is OOP? List the characteristics of OOP.1+4
Ans:-
- Emphasis is on data rather than procedures or algorithms.
- Programs are divided into what are known as objects.
- Data structures are designed such that characterize the objects.
- Functions that operate on the data are tied together in the data structure.
- Modularity for easier troubleshooting. Something has gone wrong, and you have no idea where to look.
- Reuse of code through inheritance. ...
- Flexibility through polymorphism. ...
- Effective problem solving.
Ans:-
2)Audio: In multimedia audio means related with recording, playing etc. Audio is an important components of multimedia because this component increase the understandability and improves the clarity of the concept. audio includes speech, music etc. The commonly used software for playing audio files are:
i) Quick Time
ii) Real player
iii) Windows Media Player
3)Graphics: Every multimedia presentation is based on graphics. The used of graphics in multimedia makes the concept more effective and presentable.the commonly used software for viewing graphics are windows Picture, Internet Explorer etc. The commonly used graphics editing software is Adobe Photoshop through which graphics can be edited easily and can be make effective and attractive.
4)Video: Video means moving pictures with sound. It is the best way to communicate with each other. In multimedia it is used to makes the information more presentable and it saves a large amount of time. The commonly used software for viewing videos are:
i) Quick Time
ii) Window Media Player
iii) Real Player
5)Animation: In computer animation is used to make changes to the images so that the sequence of the images appears to be moving pictures. An animated sequence shows a number of frames per second to produce an effect of motion in the user's eye.
14.Describe applications of AI.5
Ans:-
AI in Travel & Transport
AI is becoming highly demanding for travel industries. AI is capable of doing various travel related works such as from making travel arrangement to suggesting the hotels, flights, and best routes to the customers. Travel industries are using AI-powered chatbots which can make human-like interaction with customers for better and fast response.
15.Write short notes on :
a) Expert System b) E-leaning
A learning system based on formalised teaching but with the help of electronic resources is known as E-learning. While teaching can be based in or out of the classrooms, the use of computers and the Internet forms the major component of E-learning. E-learning can also be termed as a network enabled transfer of skills and knowledge, and the delivery of education is made to a large number of recipients at the same or different times. Earlier, it was not accepted wholeheartedly as it was assumed that this system lacked the human element required in learning.
---------------------------------------------------------------------
set C
-----------
HSEB-GRADE XII - 2072(2015)
Computer Science [230-C]
Time: 3 hrs
Pass Marks: 27
Group “A”
Long Answer questions 4x10=40
Attempts any Four questions:
1.Write a program which finds the sum, difference and product of 2 numbers switch case statement.10
Ans:-
//WAP to find sum,difference, and product of two numbers using switch.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int choice;
int a,b,output;
printf("please enter your two numbers for a and b for operation\n");
scanf("%d%d",&a,&b);
printf("'now,we have following menu\n");
printf( "1.to get sum\n");
printf("2. to get difference\n");
printf("3 to get product\n");
printf(" any other number to exit");
printf("enter your choice 1 or 2 or 3 or any other number\n");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("we are going to get sum\n");
printf("the sum=%d",a+b);
break;
case 2:
printf("we are going to get difference \n");
printf("the difference=%d",a-b);
break;
case 3:
printf("we are going to get product,\n");
printf("the product=%d",a*b);
break;
default:
printf("sorry, not a valid input\n");
printf("thank u, terminating....\n");
}
getch();
}
2.
Ans:-Differenceds between while and do..while are given below.
while loop | do while loop |
In the while loop, condition is checked in the beginning. | In the do while loop, condition is checked at the end. |
It is also known as a pre-test or entry control loop. | It is also known as post-test or exit control loop. |
It is not terminated with a semicolon. | It is terminated with a semicolon. |
In the while loop, statements are not executed if the condition is false. | In the do while loop, statements are executed once even the condition is false. |
It uses the keyword ‘while’. | It uses two keywords ‘do’ and ‘while’. |
The syntax of while loop is as follows: initialization; while(condition) { statements; increment/decrement; } | The syntax of do-while loop is as follows: initialization; do { statements; increment/decrement; }while(condition); |
The operation of while loop can be represented using flowchart as follows: | The operation of do while loop can be represented using flowchart as follows: |
Example: int main() { int i=1; while(i>=10) { printf("I love my country"); i++; } return 0; } Output: This program displays nothing as output; as condition is evaluated false in the beginning. | Example: #include<stdio.h> int main() { int i=1; do { printf("I love my country"); i++; }while(i>=10); return 0; } Output: This program displays “I love my country” as output at once. |
b) Write a program to display the following:
1
12
123
1234
12345
Ans:-
3.Write a program which asks nth terms of numbers and sort them in ascending order.10
4.a) What is function? List out the advantages of functions.1+4
Ans:-
1. It facilitates top down modular programming.
2. The length of a source program can be reduced by using functions at appropriate places.
3. It is easy to locate and isolate a faulty function for further investigations.
4. A function may be used by many other programs
1. Function Declaration (Function Prototype)
2. Function Call
3. Function Definition
For example,
b) Write a program to find the factorial of a given number. 5
Ans:-
#include<stdio.h>
include<conio.h>
void main()
{
int number,fact=1,i;
printf("enter any positive number\n");
scanf("%d",&number);
if(number>0)
{
for(i=1;i<=number;i++)
{
fact=fact*i;
}
}
else
{
printf("the number is not +ve\n");
}
printf("the factorial value for entered number=%d is =%d\n",number,fact);
getch();
}
5.
Ans:-
syntax:-
syntax:-
b) Write a program which asks name, age, roll –number of student and write it in a file “student.dat”.[5]
Ans:-
Group “B”
Short Answer questions 7x5=35
Attempts any Seven questions:
6.Describe SDLC with diagram.[5]
Ans:-
SDLC is a structure or a process to develop a software followed by a development team within the software organization. It consists of a detailed plan describing how to develop, maintain and replace specific software. SDLC is also known as information systems development or application development. It is life cycle defining a methodology for improving the quality of software and the overall development process.
Why SDLC:-
When business organization facing a keen competition in the market, rapid change of technology and fast internal demand, system development is necessary. In the system development, a business organization could adopt the systematic method for such development. Most popular system development method is system development life cycle (SDLC) which supports the business priorities of the organization, solves the identified problem, and fits within the existing organizational structure. And obviously software can be very difficult and complex. We need the SDLC as a framework to guide the development to make it more systematic and efficient
In summarized form we can say following reasons for SDLC.
I. To create a better interface between the user and the system.
II. For good accuracy and speed of processing.
III. High security and backup of data used in system.
IV. Sharing of data all over the world in very less and real time.
V. new laws that force organizations to do new things, or do old things differently
VI. changes in society, such as growing demand for better security over personal data
VII. a desire to improve competitiveness in the fact of reducing profits and market share
7.Define DBMS. List out the objectives of DBMS.[1+4]Ans:-
A DBMS is a system software package that helps the use of integrated collection of data records and files known as databases. It allows different user application programs to easily access the same database. DBMSs may use any of a variety of database models, such as the network model or relational model. In large systems, a DBMS allows users and other software to store and retrieve data in a structured way. Instead of having to write computer programs to extract information, user can ask simple questions in a query language.
Its roles/objectives can be listed as given below.
1. provides an interface to the user as well as to application
2. lets user to create,maintain databases.
3. provides high integrity and security to its data.
4. provides sharing facility to many users.
5. provides relationships between tables.
6. provides access level to different users.
7. maintains integrity,consistency of data e
8.What is Relational database model? List out the advantages and disadvantages of Relational database model.[1+4]Ans:-
Three key terms are used extensively in relational database models: relations, attributes, and domains. A relation is a table with columns and rows. The named columns of the relation are called attributes, and the domain is the set of values the attributes are allowed to take.
The basic data structure of the relational model is the table, where information about a particular entity is represented in columns and rows. Thus, the "relation" in "relational database" refers to the various tables in the database; a relation is a set of tuples.So,
Relational databases
Data is organized into two-dimensional tables, or relations
Each row is a tuple (record) and each column is an attribute (field)
A common field appears in more than one table and is used to establish relationships
Because of its power and flexibility, the relational database model is the predominant design approach
In this table we have used different concept like field (each column),record (each row). Each row gives us a complete information. If we have many tables then we relate them for data extractions,this is called relationship between tables.Apart from these, we also use other concept like,primary key,foreign key,Entity etc.
Advantages:
1.Faster
2.Multiuser
3.High accuracy
4.more Simple
Disadvantages:-
1.Information loss
2.Complexity
3.Physical storage
4.Performance
9.Describe the terms “SQL” and “DML”.[2.5+2.5]Ans:-
- Execute queries against a database
- Retrieve data from a database
- Insert records into a database
- Update records in a database
- Delete records from a database
10.Define computer network and explain its uses.[2+3]
Ans:-
A computer network, often simply referred to as a network, is a collection of computers and devices connected by communications channels that facilitates communications among users and allows users to share resources with other users. Networks may be classified according to a wide variety of characteristics.
Purpose of networking:-
Networking for communication medium (have communication among people;internal or external)
Resource sharing (files, printers, hard drives, cd-rom/)
Higher reliability ( to support a computer by another if that computer is down)
Higher flexibility( different system can be connected without any problems)
- Sharing devices such as printers saves money.
- Site (software) licences are likely to be cheaper than buying several standalone licences.
- Files can easily be shared between users.
- Network users can communicate by email and instant messenger.
- Security is good - users cannot see other users' files unlike on stand-alone machines.
- Data is easy to backup as all the data is stored on the file server.
11.Describe “simplex”, “half duplex” and “full duplex” with example.[1+2+2]
Ans:-
12.Differentiate between array and structure with example.[5]
Ans:-
Array | struct |
---|---|
1.It stores same type of data | 1. It stores dis-similar type of data. |
2.It uses static memory allocation . | 2.I uses dynamic memory allocation. |
3.It takes less time to access elements. | 3.It takes more time to access elements. |
4.It uses index value to access elements. | 4.It takes help of period operator(.) to access elements. |
5.It is derived data type. | 5. IT is user's defined data type. |
6.We can not define array of array. | 6.We can define array of structure. |
7.Its syntax is data type identifier[value]; example,int a[20]; | 7.Its syntax is struct tag {datatype member1; datatype member2; data type member3; }variable; example, struct det {char name[100]; char add[40]; int roll; }variable; |
13.What is E-governance? List out the objectives of E-governance.[1+4]
Ans:-
2.One of its goals is to create a cooperative structure between the government and the people and to seek help and advice from the people, to make the government aware of the problems of the people.
3.To increase and encourage people’s participation in the governance process.
4.e-Governance improves the country’s information and communication technology and electronic media, with the aim of strengthening the country’s economy by keeping governments, people and businesses in tune with the modern world.
5.One of its main objectives is to establish transparency and accountability in the governance process.
14.Describe any five application of multimedia.[5]
Ans:-
2)Multimedia in Entertainment: Computer graphics techniques are now commonly use in making movies and games. this increase the growth of multimedia.
3)Movies: Multimedia used in movies gives a special audio and video effect. Today multimedia has totally changed the art of making movies in the world. Difficult effect, action are only possible through multimedia.
4)Games: Multimedia used in games by using computer graphics, animation, videos have changed the gaming experience. Presently, games provides fast action, 3-D effects and high quality sound effects which is only possible through multimedia.
5)Multimedia in Business: Today multimedia is used in every aspect of business. These are some of the applications:
a) Computer Crime b) Social impact of the ICT
Ans:-
Below is a listing of the different types of computer crimes today.
Positive impacts in society:-
1.File sharing/transferring:-
A file can be put on a "Shared Location" or onto a File Server for instant use by colleagues does not matter what is a size of file and how many will use it. Mirror servers and peer-to-peer networks can be used to ease the load of data transfer.
2.Internet banking:-
We know that almost all banks now-a-days are using this technology for its customers as an extra facility. Internet Banking/ Online Banking allows bank customers to do financial transactions on a website operated by the banks. The customers can do almost any kind of transaction on the secured websites. They can check their account balance, transfer funds, pay bills, etc. but security is a major issue for thi
No comments:
Post a Comment