-->

NEB year 2070 computer science questions and solutions



NEB year 2070 computer science questions

Set A







HSEB-GRADE XII - 2070(2013)

Computer Science [230-Supplementary]

                                                                                                                                               Time: 3 hrs


                                                                                                                                             Full Marks : 75

                                                                                                                                            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 two numbers using switch case statement.10
2.Describe the types of loop with flowchart and example.10
3.Write a program which asks the user to input “n” terms of number and find out the greatest and smallest number among those numbers.10


4.Differentiate between array and structure with suitable examples.5+5

5.Write a program which asks name, age, roll number of students and write them in a file “xyz.dat”.10




                                                                Group “B”

                                            Short Answer questions 7x5=35


Attempts any Seven questions:


6.Explain SDLC with appropriate diagram.5


7.Explain the database models with clear diagrams.5


8.What is DBMS? List out the functions of DBMS.1+4


9.Define computer networks and explain their uses.1+4


10.Describe simplex, half duplex and full duplex channel of communication with examples.5


11.What is operator? Describe the types of operators with appropriate examples.1+4


12.What is OOP? List out the advantages of multimedia system.1+4


13.What is multimedia? List out the advantages of multimedia system.1+4


14.What is AI? Explain the application areas of AI.1+4


15.List out the advantages and disadvantages of e-business.5
--------------------------------------------------------------------------------
Answers:-
--------------------


Group “A”

Long Answer questions 4x10=40


Attempts any Four questions:


1.Write a program which finds the sum, difference and product of two numbers using switch case statement.

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.Describe the types of loop with flowchart and example.

Ans:-

While loop:-

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

do..while loop:-
It also executes program statements repeatedly until the given condition is true. It executes the program statements once at first then only condition is checked. If a condition is found true then it executes the program statements again, otherwise it gets out from the loop structure. As it checks the condition at last it is also known as the post-test loop or exit control loop.
syntax:-
initialization;
do
{

statements;

increment/decrement;
}while(condition);
Flowchart:-


Example:
#include<stdio.h>
int main()
{
int i=1;
do
{
printf("%d,",i);
i=i+1;
}while(i<=20);
return 0;
}

Output:
If we execute this we will get 1,2,3....20
for loop:-
It is the most common type of loop which is used to execute a program statement or block of program statements repeatedly for a specified number of times. It is a definite loop. Mainly it consists of three expressions: initialization, condition and increment / decrement. The initialization defines the loop starting point, condition defines the loop stopping points and counter helps to increment and decrement the value of counter variable.

syntax:-
for(initialization;condition;increment/decrement )
{
statements;
}

Flowchart:-


For example:
#include<stdio.h>
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
3.Write a program which asks the user to input “n” terms of number and find out the greatest and smallest number among those numbers.10
Ans:-
/*to find the greatest and smallest value*/
#include<stdio.h>
int main()
{
    int numbers[10];
    int i,great,small;
    printf("enter numbers\n");
    for(i=0;i<=9;i++)
    {
        scanf("%d",&numbers[i]);
    }
    great=numbers[4];
    small=numbers[3];
    
for(i=0;i<=9;i++)
    {
        if(great<numbers[i])
        {
            great=numbers[i];
        }
        else if(small>numbers[i])
        {
            small=numbers[i];
        }
    }
    printf("greatest number =%d nd smallest number=%d",great,small);
    return 0;
}


4.Differentiate between array and structure with suitable examples.5+5
Ans:-
Differences between array and struct are given below.                                                                                                                                                
Arraystruct
1.It stores same type of data1. 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;

5.Write a program which asks name, age, roll number of students and write them in a file “xyz.dat”.10

Ans:-
#include<stdio.h>
int main()
{
int roll;
char name[100];
int age;
 FILE *k;
k=fopen("xyz.dat","w");
printf("enter student roll,name and age\n");
printf("\nand press ctrl+z to exit\n");
while((scanf("%d %s %d",&roll,name,&age))!=EOF)
{
  fprintf(k,"%d %s %d\n",roll,name,age);
}
fclose(k);
printf("data stored successfuly");
return 0;
}


                                                                        Group “B”

                                                            Short Answer questions 7x5=35



Attempts any Seven questions:


6.Explain SDLC with appropriate 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.Explain the database models with clear diagrams.5
Ans:-We hahve many database models like, hierarchical,network,relational,E-R model, etc.Here we are going to understand about two.
Relational model:-

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


name

street

city

id no.

balance

RAm

Thapagaun

KTm

00321

Rs. 900087

ekan

BAneshwor

Pokhara

008

Rs.45666

Hary

Kalanki

Ktm

9870

Rs. 65799

Sam

Koteshwor

Ktm

7890

Rs. 5600

Kale

Kalnki

Ktm

456

Rs. 65400


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)

8.What is DBMS? List out the functions of DBMS.1+4
Ans:-

Database Management System (DBMS):-It’s a set of computer programs that controls the creation, maintenance, and the use of the database with computer as a platform or of an organization and its end users. 

             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 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 et


9.Define computer networks and explain their uses.1+4
Ans:-

Networking: 

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)

  • Scalable (computers and devices can be added with time without changing original network.

  • provides distributed and centralized management system for enterprise.

  • increase productivity.

  • cost reduction by sharing one application/hardware etc.

Application of networking in our daily life:

-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 simplex, half duplex and full duplex channel of communication with examples.5
Ans:-
Simplex: - in this data flows in only one direction on data communication line. Examples are television and radios broadcasts; they go from station to our home. We can say one way communication takes place.
Half duplex: - the data flows in both directions but only direction at a time on data communication line. Each station can both transmit and receive. Example a talk on walkie–talkie is half duplex. Each person talks on turning.
Full duplex:-The data flows in both directions at same time. The system designed in such a way that data flow occurs in both the sides. Example, mobile phones, land line sets, two ways trafficking system etc.

11.What is operator? Describe the types of operators with appropriate examples.1+4
Ans:-
operator:-
operator:- It is a symbol or a character used in programming. It is used to carry out some operation.
for example: +,-,= etc
Types of operator:-
It is of following types.
1)Arithmetic operator: It is used to do arithmetic calculations/operation.
 It has following types.

 +         -----------> used for addition.example is a+b. It means we are performing addition with the help of operand a and b
-           ------------>It is used for subtraction.Example is a-b.  It means we are performing subtraction with the help of operand a and b
* -------------------->used for multiplication.example is a*b. It means we are performing multiplication with the help of operand a and b
/---------------->used for division.example is a/b. It means we are performing division with the help of operand a and b
%---------------->used for remainder division.example is a%b. It means we are performing division with the help of operand a and b.It gives us remainder after division.

2)relational operator: 
This operator is used to perform comparisons between variables.It supports us to take decision logically. example,x>y ,x>=y etc
Relational operator has following types.


>------> It is used to show greater than. like x>y
>=----->It is used to show greater than or equals to.like x>=y
<-------->It is used to show a variable is smaller than another.like x<y
<=-------> It is used to show smaller than or equals to with another variable.Like x<=y
!=----------> I simply says , two variables are not equal in value.like x!=y
==---------->It says two variables have same value.It is used to test values of two variables.

3)Logical operator:-
                                   This operator is quite helpful when we want to combine multiple  conditions and take decision.It returns values in the form of 0 o 1.It works logically.
Its types are:

3.a)and (&&)-----------> It is called 'and'operator.It is used to combine multiple conditions.It gives us true output if all of them are true otherwise we get false output.
 example:if(a>b && a>c)
                      {
                            display a     
                        }
 we can see here that to be greatest,value of 'a' must be greater than b and c. So we use here '&&'
   
  3.b)or(||):- It is called 'or'operator.It is used to combine multiple conditions.It gives us true output if anyone of them is true or all are true otherwise we get false output.
 example:if(a==90 || b==90 || c==90)
                      {
                            display right angle triangle  
                        }
 we can see here that to be right angled triangle,either 'a'or 'b'or 'c' a must be 90 . So we use here '||'.

3.c) !(not )operator:-
                                It is used to reverse the result.
example
int a=5;
if(!(a==5))
{
printf("it is\n");
}
else
{
printf("it is not\n");
}
here ,the value is 5 but we get output "it is not".It is called reversing the output.

4) Assignment operator:
                                an operator ,symbolized by '=' character,is called assignment operator.It assigns value to variable.
example:
int a=6;
It means, we are assignming value 6 to variable a.

5)Unary operator:- this operator  works on one operand only.It has two types.
                               I) increment operator:- It increases the value of given variable by one.For example: ++y or y++
                                             It can be classified into pre-increment and post increment.
                                                 pre-increment:- It is written as ++x.It means first increase the value and then use that.
                                                 post-increment: It is written as x++.It means, first use that and then increase its value by one.

                               II)decrement operator:- It decreases the value of given variable by one.For example: --y or y--
                                             It can be classified into pre-decrement and post decrement.
                                                 pre-decrement:- It is written as --x.It means first decrease the value and then use that.
                                                 post-decrement: It is written as x--.It means, first use that and then decrease its value by one.


Besides these all, we have some other operators .like  bitwise,




12.What is OOP? List out the advantages of OOP.1+4

Ans:-
OOP:-
The major motivating factor in the invention of object oriented is to remove some of the flaws encountered in the procedural oriented approach. Object oriented programming uses concept of “Object” and treats data as a critical element in the program development and does not allow it to flow freely around the system. It ties data more closely to the functions that operate on it, and protects it from accidental modifications from outside functions.
Some features are:-
1) Emphasis is on data rather than procedures or algorithms.
2) Programs are divided into what are known as objects.
3) Data structures are designed such that characterize the objects.
4) Functions that operate on the data are tied together in the data structure.
Advantages of OOP:-
  • 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.

13.What is multimedia? List out the advantages of multimedia system.1+4
Multimedia:-

Multimedia is a broad term for combining multiple media formats. Whenever text, audio, still images, animation, video and interactivity are combined together, the result is multimedia. Slides, for example, are multimedia as they combine text and images, and sometimes video and other types.
Following are some advantages of Multimedia:-
1)Multimedia in Education: Multimedia is becoming popular in the field of education. It is commonly used to prepare study material for the students and also provide them proper understanding of different subjects.Nowadays Edutainment, a combination of Education and Entertainment has become very popular. This system provides learning as well as provides entertainment to the user.

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:

14.What is AI? Explain the application areas of AI.1+4
Ans:-
A.I.:-
Artificial intelligence is where machines can learn and make decisions similarly to humans. There are many types of artificial intelligence including machine learning, where instead of being programmed what to think, machines can observe, analyse and learn from data and mistakes just like our human brains can. This technology is influencing consumer products and has led to significant breakthroughs in healthcare and physics as well as altered industries as diverse as manufacturing, finance and retail. In part due to the tremendous amount of data we generate every day and the computing power available, artificial intelligence has exploded in recent years. We might still be years away from generalised AI—when a machine can do anything a human brain can do—, but AI in its current form is still an essential part of our world.

Application areas:-
game playing
You can buy machines that can play master level chess for a few hundred dollars. There is some AI in them, but they play well against people mainly through brute force computation--looking at hundreds of thousands of positions. To beat a world champion by brute force and known reliable heuristics requires being able to look at 200 million positions per second.
speech recognition
In the 1990s, computer speech recognition reached a practical level for limited purposes. Thus United Airlines has replaced its keyboard tree for flight information by a system using speech recognition of flight numbers and city names. It is quite convenient. On the the other hand, while it is possible to instruct some computers using speech, most users have gone back to the keyboard and the mouse as still more convenient.
understanding natural language
Just getting a sequence of words into a computer is not enough. Parsing sentences is not enough either. The computer has to be provided with an understanding of the domain the text is about, and this is presently possible only for very limited domains.
computer vision
The world is composed of three-dimensional objects, but the inputs to the human eye and computers' TV cameras are two dimensional. Some useful programs can work solely in two dimensions, but full computer vision requires partial three-dimensional information that is not just a set of two-dimensional views. At present there are only limited ways of representing three-dimensional information directly, and they are not as good as what humans evidently use
.

15.List out the advantages and disadvantages of e-busines.
Ans:-
e-business:-
It stands for electronic business or online business. It is a business where the transaction takes place online, and the buyer and seller need not meet in-person. Electronic business is a part of E-commerce, i.e. electronic commerce.
Advantages:-

24/7 Availability

Your website is an invaluable e-business tool. There is no e-business model or e-business owner that does not have a website. Having your website opens the door to more business advantages.
Global Reach

Through the internet, you can reach a worldwide audience for your product or service. There are no physical restrictions on a specific geographical region that you see with a traditional business.


Disadvantages:-


Innovation Pressure

With an e-business model, it exposes you to a global competitive field, and there is a tendency for your brand’s voice to be drowned out in a sea of several thousand competitors. This situation leads to constant pressure to innovate. Be innovative to get and keep your customers; otherwise, you lose out to the competition. It would help if you also innovated your supply chain to meet your customers’ expectations.
Cost and Shipping

Factors such as exchange rate, taxes and shipping might sometimes make your product unaffordable for your consumers living in another geographical location.

After considering these issues, if you still wish to go ahead with your e-business, here is an infographic with 5 Tips for an Efficient E-Business to help you out.
--------------------------------------------------------------------------------------------------------
set B

                                                        HSEB-GRADE XII - 2070(2013)

                                                                                                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.What is control statement? Describe “Sequence”, “Selection” and “Loop” with flowchart and examples.2+8

Ans:-
control statement:
When we write program and run on system, the execution occurs immediately. The execution of instruction sometimes has to be controlled by using many parts or blocks of statements to get desired output. This is called control structure. These are in built and very important part of programming field and programmers too. By using this we can glue the different parts like, “what a program is”, “what a program is going to do”, “what will happen if a particular condition satisfies and if does not satisfy” etc. this part is also called logic, Which is the heart of program, which makes the program sensible and meaningful. Mainly, we have three parts as a control structures or simply logics.

1. Sequence: Our program contains many lines of codes or instructions. This says about execution of lines one after another in a sequence or order. While writing program the codes should be in certain sequence to get desired output if not then we may get some like unexpected output. Flowchart can be used to represent like given below.      

FLOWCHART

IN QB,

CLS

a=9

b=8

print “hello”

print a

print b

end

HERE, WE CAN SEE HOW A PROGRAM EXECUTES WRITTEN IN QB. AT FIRST, FIRST LINE GETS EXECUTED THEN SECOND AND SO ON.

SELECTION: THIS LOGICAL PART SAYS ABOUT “SELECTION OF CERTAIN BLOCK OF STATEMENTS/PARTS/” BUT UNDER CERTAIN CONDITION. IN OUR DAILY LIFE ALSO  WE USE THIS CONCEPT, DON’T WE? LET’S TAKE AN EXAMPLE; IF I HAVE RS. 1000 THEN I WOULD DO THIS/THAT, IF NOT, THEN NOTHING I WILL. SO, YOU DO NOT THINK THAT IT’S SIMPLE TO UNDERSTAND ABOUT SELECTION. IN OUR PROGRAM, SOME WHERE WE HAVE TO USE THIS CONCEPT VERY FREQUENTLY. IT CAN BE REPRESENTED BY USING FLOW CHART AS GIVEN BELOW.

A SAMPLE PROGRAM IN QB/C LOOKS LIKE:


QB

{

int a=2;

if(a%2==0)

{

printf(“even”);

}

Else

{

printf(“odd”);

}



we can see here how an execution takes place. At first the condition is tested ,if it is satisfying then many instructions one after another execute and if the condition does not satisfy then other instruction get executed.  

Just like if.... we can use other selection structure like if..else if,switch... etc if there are multiple conditions to be tested or included. they work in same manner as ‘if’ works as shown above.

Iteration (Looping):-It simply says execution of different statements/blocks again and again repeatedly under certain condition. When the condition dissatisfies, the execution stops. This is called iteration or looping. With the help of flowchart, we can represent as

flowchart

a simple ‘c’ code

In Programming, we write in following way under body line( in c).

for(i=1;i<=4;i++)

{

printf(“%d”,i);

Here, we can see how an execution occurs many times if the condition satisfies(  in same as in flowchart).














In above flowchart or code we can see that there is an entry point ,condition testing and then executing many instructions,this execution just goes on or repeats again and again after checking condition.when the condition becomes false the further movement or execution does not occur and  termination takes place.

For looping, we can use different other statements in same manner like while or do.. while or do...until etc. The working way and syntax are little bit different but we get same output.


2.Write a program which reads name of 20 employees and sort them in alphabetical order.10

Ans:-/* 
C program to input name  of 20 employees and arrange
them in ascending order to the name.
*/
#include <stdio.h>
#include<string.h>
struct shorting
{
  char name[100];
}var[20],var1;
int main()
{
    int i,j;
    printf("enter name\n");
    for(i=0;i<=19;i++)
    {
        scanf("%s",var[i].name);
    }
for(i=0;i<=19;i++)
{
    for(j=i+1;j<=19;j++)
    {
        if((strcmp(var[i].name,var[j].name))>0)
        {
            var1=var[i];
            var[i]=var[j];
            var[j]=var1;
        }
    }
}
for(i=0;i<=19;i++)
    {
        printf("name=%s\n",var[i].name);
       
    }
    return 0;
}




3.Differentiate between structure and union with suitable examples.5+5
ans:-
The differences between struct and union are given below in tabular form.
                   
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;



4.What is recursion? Write a program to calculate factorial value of given number using recursive function.2+8
Ans:-
Recursion:-
Recursion is the process of defining a problem (or the solution to a problem) in terms of (a simpler version of) itself.

All recursive algorithms must have the following:

  1. Base Case (i.e., when to stop)

  2. Work toward Base Case

  3. Recursive Call (i.e., call ourselves.

second part:-
//program to get factorial value of a number using recursion
#include <stdio.h>
#include <stdlib.h>
int recur(int n);
int main()
{
 int n;
 printf("ente a number\n");
 scanf("%d",&n);
printf("the factorial value is\n");
printf("%d",recur(n));
getch();
return 0;
}
int recur(int n)
{
 if(n<=0)
  {
          return 1;
}
else
{
    return n*recur(n-1);
}

}

5.Write a program which reads name, department and age from a file named “employee.dat” and display them.10

Ans:-
/*program which reads name, department and age from a file named “employee.dat” and display them.
*/
#include<stdio.h>
int main()
{
 FILE *p;
char name[100];
char dept[100];
float age;
p=fopen("employee.dat","r");
while((fscanf(p,"%s %s %f",name,dept,&age))!=EOF)
{
 printf("name=%s,department=%s,age=%f\n",name,dept,age);
}
fclose(p);
return 0;
}


                                                                    Group “B”

                                                            Short Answer questions 7x5=35



Attempts any Seven questions:


6.What is system? Explain the basic elements of system.1+4

Ans:-
System:-

Similarly an Information system is an arrangement of people, data, processes information presentation and information technology that interacts to support and improve day to day operation in a business as well as support the problem solving and decision making needs of management.

       An Information system(computerised system) carries following characteristics:-

·         Organization: implying structure and order.

·         Interaction      :-refers procedure in which in which each component functions with other units.

·         Interdependence:-means that one component of the system depending on others.

·         Integration: - saying how a system is tied together. it is more than just sharing a physical part.

·        Central objective: - is quite common that an organization may set one objective and operative together to achieve together. Since it is a common goal for all the units or components so all the users or units have to be aware about this. 

Basic elements:-

Hardware:-It is a physical component of a computer. Example :Monitor,keyboard etc

Software:It is the collection of programs. It runs the system. Example:O.S.

Process:It is the procedure which helps the computer to perform a task

People:-They are users who use the system
Data and information:-Data means raw facts and informations mean processed output.

7.Who is system analyst? List out the roles of system analyst.1+4
Ans:-
System analyst:-
The persons who perform above task/system analysis,design and implementation activity is know as system analyst. Somewhere we say or call by names like business engineer, business analyst etc. The work of system analyst who designs an information system is just same as an architect of a house. They work as facilitators of the development of information systems and computer applications.
Roles:-

Defining Requirement: It's very difficult duty of analyst to understand user's problems as well as requirements. some techniques like interview, questioning, surveying, data collection etc have to be used. The basic step for any system analyst is to understand the requirements of the users.
Prioritizing Requirements: Number of users use the system in the organization. Each one has a different requirement and retrieves different information and in different time. For this the analyst must have good interpersonal skill, convincing power and knowledge about the requirements and setting them in proper order of all users.
Gathering Facts, data and opinions of Users: After determining the necessary needs and collecting useful information the analyst starts the development of the system with active cooperation from the users of the system. Time to time, the users update the analyst with the necessary information for developing the system. The analyst while developing the system continuously consults the users and acquires their views and opinions.
Evaluation and Analysis: Analyst analyses the working of the current information system in the organization and finds out extent to which they meet user's needs. on the basis of facts,opinions, analyst finds best characteristic of new system which will meet user's stated needs.
Solving Problems: Analyst is actually problem solver. An analyst must study the problem in depth and suggest alternate solutions to management. Problem solving approach usually has steps: identify the problem, analyse and understand the problem, identify alternate solutions and select best solution.
8.Differentiate between DBMS and RDBMS with examples.2.5+2.5

Ans:- 

No.

DBMS

RDBMS

1)

DBMS applications store data as file.

RDBMS applications store data in a tabular form.

2)

In DBMS, data is generally stored in either a hierarchical form or a navigational form.

In RDBMS, the tables have an identifier called primary key and the data values are stored in the form of tables.

3)

Normalization is not present in DBMS.

Normalization is present in RDBMS.

4)

DBMS does not apply any security with regards to data manipulation.

RDBMS defines the integrity constraint for the purpose of ACID (Atomocity, Consistency, Isolation and Durability) property.

5)

DBMS uses file system to store data, so there will be no relation between the tables.

in RDBMS, data values are stored in the form of tables, so a relationship between these data values will be stored in the form of a table as well.

6)

DBMS has to provide some uniform methods to access the stored information.

RDBMS system supports a tabular structure of the data and a relationship between them to access the stored information.

7)

DBMS does not support distributed database.

RDBMS supports distributed database.

8)

DBMS is meant to be for small organization and deal with small data. it supports single user.

RDBMS is designed to handle large amount of data. it supports multiple users.

9)

Examples of DBMS are file systems, xml etc.

Example of RDBMS are mysql, postgre, sql server, oracle etc.


9.Describe the data types which are used in C programming.5
Ans:-
C language provides us the way to hold any type of data in it. It is called data type. In C language data types classified into two categories:-
1.Primary data type
2.secondary data type
Major data types  used in C:-Mostly we use primary data types.they are
int,float,double,char

Integers:- An integer can be a whole number but not a fractional number. It can accept any + ve or –ve number.  It is very common type of data used by computer. When we add/subtract/divide/multiply, we get integer but if output is in fractional, the system just truncates that decimal part and returns only integer part. Like 1+2 yields 3. 3 divided by 2 yields 1. For this data type in some language, we use some suffix like % or word like ‘int’.

                  

Floating part:- If we are going to write a program which includes some like fraction type of data then we use this data type. Like, 1.23, -.34.45 etc. the computers recognize the real numbers having fractions easily and processes accordingly. For float type of data, we use some words like ‘float’ and some where suffix like ! or #.

                            

                        

Character type:- Simply a letter or a number or space or any other symbol which we use in program is called character. A single character is placed in a single quote like ‘a’ or ‘,’ or ‘1’ etc. but, if we combine many characters then we put inside double quote like “computer”, it has 8 characters. For this type, we use reserved word like ‘char’ in C and some where it is not needed.

                            

                       String type: A data type which contains many characters together and mostly put inside double quote (in most language) is called string. Like “computing” or “education” etc. for this, we use reserved word char with some index value. In C, we can write char name[20];. Here name is a string type of data and holds up to 20 characters.


Double:-  
This data type is used for exponential values and for more accuracy of digits.It's working range is more than others. so if we want to use long numbers of any type and high accuracy then...? for example,
   data type variable;
double ab;
'ab' is a variable of double type. It can store exponential values (3x104). It ca n be written as 3e+4 or 3E+4. If power is in negative form then it can be in 3e-4 or 3E-4. It has one advantage over others that it can be used in place of others easily.
10.Describe the types of network topologies with clear figures.5
Ans:-
As we know there are many types topologies. 
1.Bus topology
2.Star topology
3.Mesh topology
4.Ring topology
5.Star-ring topology
6.Tree topology
etc
Here we are going to understand about two.

star topology:

A star topology is designed with each node (file server, workstations, and peripherals) connected directly to a central network hub, switch, or concentrator (See fig. 2).
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.


Ring topology:
A ring network is a network topology in which each node connects to exactly two other nodes, forming a single continuous pathway for signals through each node – a ring. Data travels from node to node, with each node along the way handling every packet.


Advantages of Ring topology:

  • 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
disadvantages:-
1.It is difficult to find the problem.
2.To add extra noe or computer, we have to di-assemble entire networks.
3.It is expensive
4.Shutting down of one node leads entire networking to be down

11.Explain polymorphism and inheritance with examples.2.5+2.5
Ans:-
polymorphism :-
Its an important OOPs concept , Polymorphism means taking more than one forms .Polymorphism gives us the ultimate flexibility in extensibility. The ability to define more than one function with the same name is called Polymorphism.Polymorphism allows the programmer to treat derived class members just like their parent class’s members. More precisely, Polymorphism in object-oriented programming is the ability of objects belonging to different data types to respond to calls of methods of the same name .If a Dog is commanded to speak(), this may elicit a bark(). However, if a Pig is commanded to speak(), this may elicit an oink(). Each subclass overrides the speak() method inherited from the parent class Animal.
example is:
Simple example of Polymorphism, look at an Account (it may be checking or saving assuming each attract different dividends) you walk in a bank and ask a teller what is my balance? or dividends? you don't need to specify what kind of an account you're having he will internally figure out looking at his books and provide you the details.

Inheritance
Inheritance is mainly used for code reusability.In the real world there are many objects that can be specialized. In OOP, a parent class can inherit its behavior and state to children classes. Inheritance means using the Predefined Code. This is very main feature of OOP, with the advantage of Inheritance we can use any code that is previously created. This concept was developed to manage generalization and specialization in OOP.  Lets say we have a class called Car and Racing Car . Then the attributes like engine no. , color of the Class car can be inherited by the class Racing Car . The class Car will be Parent class , and the class Racing Car will be the derived class or child class
The following OO terms are commonly used names given to parent and child classes in OOP:
Superclass: Parent class.
Subclass: Child class.
Base class: Parent class.
Derived class: Child class
It can have many types.
single inheritance:-one derived class inherits property from one base class
multiple              “  :- one derived class inherits property from many base classes.
multi level          “ :-in this many derived classes are inherited from many base classes
hierarchical       “ :-under this many derived classes can be inherited from single base class
hybrid                 “:-it’s a combination of hierarchical and multilevel.



12.Describe compute crime and its various forms.1+4

Ans:-
Alternatively referred to as cyber crime, e-crime, electronic crime, or hi-tech crime. Computer crime is an act performed by a knowledgeable computer user, sometimes referred to as a hacker that illegally browses or steals a company's or individual's private information. In some cases, this person or group of individuals may be malicious and destroy or otherwise corrupt the computer or data files.


Below is a listing of the different types of computer crimes today. Clicking on any of the links below gives further information about each crime.
Child pornography - Making or distributing child pornography.
Cyber terrorism - Hacking, threats, and blackmailing towards a business or person.
Cyberbully or Cyberstalking - Harassing others online.
Creating Malware - Writing, creating, or distributing malware (e.g. viruses and spyware.)
Denial of Service attack - Overloading a system with so many requests it cannot serve normal requests.
Espionage - Spying on a person or business

13.List out the advantages and disadvantages of multimedia.5
Ans:-

Advantages of Multimedia


-  It is very user-friendly. It doesn’t take much energy out of the user, in the sense that you can sit and watch the presentation, you can read the text and hear the audio.

-  It is multi sensorial. It uses a lot of the user’s senses while making use of multimedia, for example hearing, seeing and talking.

-  It is integrated and interactive. All the different mediums are integrated through the digitisation process. Interactivity is heightened by the possibility of easy feedback.

-  It is flexible. Being digital, this media can easily be changed to fit different situations and audiences.

-   It can be used for a wide variety of audiences, ranging from one person to a whole group.


Disadvantages of Multimedia

-  Information overload. Because it is so easy to use, it can contain too much information at once.

-   It takes time to compile. Even though it is flexible, it takes time to put the original draft together.

-   It can be expensive. As mentioned in one of my previous posts, multimedia makes use of a wide range of resources, which can cost you a large amount of money.

-  Too much makes it unpractical. Large files like video and audio has an effect of the time it takes for your presentation to load. Adding too much can mean that you have to use a larger computer to store the files.



14.What are the objectives of e-governance? Explain.5
Ans:-


The objectives of e governance are as follows-
1.One of the basic objectives of e-governance is to make every information of the government available to all in the public interest.
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.

15.Write short notes on :2.5+2.5

a) Normalization b) Expert System
Ans:-

a)Normalization:-

In the field of relational database design, normalization is a systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain undesirable characteristics—insertion, update, and deletion anomalies that could lead to a loss of integrity.
It is of following types:
1N
2N
3N
4N
and 5N
b)Expert system:-
In artificial intelligence, an expert system is a computer system emulating the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning through bodies of knowledge, represented mainly as if–then rules rather than through conventional procedural code.
For example:
MYCIN: It was based on backward chaining and could identify various bacteria that could cause acute infections. ... DENDRAL: Expert system used for chemical analysis to predict molecular structure. PXDES: An Example of Expert System used to predict the degree and type of lung cancer
---------------------------------------------------------------------------------------------------------

Set C

                                            HSEB-GRADE XII - 2070(2013)

                                                Computer Science [230-C]




                                                                                                                    Time: 3 hrs Full Marks : 75

                                                                                                                    Pass Marks: 27






                                                               Group “A”

                                    Long Answer questions 4x10=40


Attempts any Four questions:


1.What is nested loop? Write a program to display the multiplication table of nth terms of given numbers.2+8
Ans:-
Nested loop:
We can write an entire loop structure inside another loop structure. So a loop inside another loop is called a nested loop.

Syntax:


for(initialization; condition ; increment/decrement)
{
    for(initialization; condition ; increment/decrement)
        {
        statements;
        }
}
Example:-
#include<stdio.h>
int main()
{
    int i,j,k=3;
    for(i=1;i<=3;i++)
    {
        for(j=1;j<=k;j++)
        {
                printf("%2d",j);
        }
        printf("\n");
        k--;
    }
    return 0;
}
Second part:-
//program to display multiplication table of  nth term using nested loop.
#include<stdio.h>
#include<conio.h>
void main()
{
int k,n;
printf("enter value of 'n'th term\n");
scanf("%d",&n);
for(i=1;i<=n;i++)
  {
    for(k=1;k<=10;k++)
      {
          printf("%d\n",i*k);
       }
          printf("\n");
   }
getch();
}
2.Describe any five “string handling functions” with examples.10
Ans:-
1) strlen(string);-It is used to get length of given string.

 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));
}

We get APPLE as an output after execution.

5)strcpy();- We use this function to copy one string to another. while copying, one replaces another.
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.

Like these all, we have many other string handling functions like, strcat(),strchr(),strdup(),strset() etc.

3.Describe array, structure and pointer with examples.10
Ans:-
Array:-
Definition: A composite variable capable of holding multiple data of same data type under a single variable name is called array.
Features:
->stores multiple values
->helps to solve complex porblem
->can be used as array as pointer
->pixel based graphics programming made easier etc

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.
syntax:
data type arra[value/size];
For example:
int a[10];
This array stores ten value starting from location zero na dends at 9.

b) Two Dimensional Array (2-D):an array where we may use two or more than two subscript values.
In this we use matrix concept.
syntax:
data type arra[row size][column size];
For example:
int a[2][2];
It uses two rows and two columns.
Values are stored as:

 

Column zero

Column one

Row 0 à

1(0,0)

2(0,1)

Row 1à

3(1,0)

4(1,1)

This array stores total four  values starting from location zero and ends at 1.
Structure:
.It stores dis-similar data.Each gets separate space in memory.They do not share memory.we can access member in any sequence.It uses keyword 'struct'.We can initialize values of member/s and in any order.It consumes more memory.
Its syntax is,
    struct tag
{
datatype member1;
datatype member2;
datatype member3;
}variable;

Example
struct student
{
int roll;
char sex;
float percentage;
}var;

Pointer:-

A pointer is a variable that stores a memory address.  Pointers are used to store the addresses of other variables or memory items.  Pointers are very useful for another type of parameter passing, usually referred to as Pass By Address.  Pointers are essential for dynamic memory allocation.

Features:

1.It handles memory effectively.

2.Useful in file handling

3.Reduces spaces.

4.REduces execution time.

Example:

 

#include<stdio.h>

int main()

{

int *k;

int m=90;

k=&m;

printf("address=%d",k);

printf("value=%d",*k);

return 0;

}
here , k is a pointer and will store address of a variable m. It is then printed using printf(). To print its value we have to use  indirection operator.


4.Write a program which reads salary of 25 employees and count the number of employees who are getting salary between 30,000 to 40,000.10
Ans:-
/* to count ttoal number of employees getting salary between 30,000 to 40,000.
*/
#include <stdio.h>

int main()
{
    float salary[25];
    int i,count=0;
    printf("enter salary of 25 employees\n");
    for(i=0;i<=24;i++)
    {
       
       
        scanf("%f",&salary[i]);
        if(salary[i]>=30000 && salary[i]<=40000)
        {
            count++;
        }
    }
    printf("total number of employees getting salary in 30000 and 40000 is=%d",count);
    return 0;
}



5.Describe fprintf and fscanf file handling functions. Write a program which writes “Welcome to Nepal” in a file.10
Ans:-
fprintf():
The fprintf() function is used to write set of characters into file. It sends formatted output to a stream.

syntax:-

int fprintf(FILE *stream, const char *format [, argument, ...])
For example:-
fprintf(k,"%s%d","Ram kumar",12);
It writes data to a file created by file pointer k   
fscanf():-
The fscanf() function is used to read set of characters from file. It reads a word from the file and returns EOF at the end of file.
syntax:-
int fprintf(FILE *stream, const char *format [, argument, ...])
For example:-
fscanf(k,"%s%d",name,roll);
It reads data from a datafile pointed by file pointer k .name  and roll are variables.

second part:-
/* to store "welcome to Nepal" */
#include<stdio.h>
int main()
{
 FILE *p;
char name[100]="welcome to Nepal";

p=fopen("info.dat","w");

 fprintf(p,"%s",name);

fclose(p);
return 0;
}
                                                                                        Group “B”

                                                                Short Answer questions 7x5=35


Attempts any Seven questions:
6.What is feasibility study? Explain different levels of feasibility study.1+4
Ans:-
feasibility study:-
 It is the measure and the study of how beneficial the development of the system would be to the organization. This is known as feasibility study. The aim of the feasibility study is to understand the problem and to determine whether it is worth proceeding.
It has following types.

1.Technical feasibility: - This is concerned with availability of hardware and software required for the development of system.The issues with can be like:
1.1) Is the proposed technology proven and practical?
1.2)the next question is: does the firm possess the necessary technology it needs. Here we have to ensure that the required technology is practical and available. Now, does it have required hardware and software?
1.3)The Last issue is related to availability of technical expertise. In this case, software and hardware are available but it may be difficult to find skilled manpower.
2.Operational feasibility:- It is all about problems that may arise during operations. There are two aspects related with this issue:
2.1) what is the probability that the solution developed may not be put to use or may not work?
                                   2.1) what is the inclination of management and end users towards solutions?
Besides these all some more issues;
                                                           a) Information: saying to provide adequate, timely, accurate and useful information to all categories of users.
                                                       b) Response time, it says about response about output in very fast time to users.
                                            c) Accuracy: A software system must operate accurately. It means, it should provide value to its users. It says degree of software performance.
           d) Services:- The system should be able to provide reliable services.
             e)Security:- there should be adequate security to information and data from frauds.
f) Efficiency: The system needs to be able to provide desirable services to users.
3) Economic feasibility: - It is the measure of cost effectiveness of the project. The economic feasibility is nothing but judging whether the possible benefit of solving the problem is worthwhile or not. Under "cost benefit analysis", there are mainly two types of costs namely, cost of human resources and cost of training.
                                                             The first one says about salaries of system analysts, software engineers, programmers, data entry operators etc. whereas 2nd one says about training to be given to new staffs about how to operate a newly arrived system.

4) Legal feasibility: - It is the study about issues arising out the need to the development of the system. The possible consideration might include copyright law, labor law, antitrust legislation, foreign trade etc.
Apart from these all we have some more types:
behaviour feasibility, schedule feasibility study etc.

7.What is Hierarchical database model? List out the advantages and disadvantages of Hierarchical database model.1+4

Ans:-
Hierarchical database model:-

Hierarchical database is a model in which data is organized into a tree-like structure. In this,

  • Data is organized like a family tree or organization chart

  • The parent record can have multiple child records – child records can only have one parent

  • Pointers link each parent record with each child record

  • Complex and difficult to maintain

This structure allows one 1:N relationship between two types of data. This structure is very efficient to describe many relationships in the real world; recipes, table of contents, ordering of paragraphs/verses,

        Example:



We can see here a parent node with many branches called children.Each child has their own record with furhher informations.In given diagram, the first record has name “Ram” with street “Baneshwor” and city named kathmandu. It is further linked to its balance id and amount. In same fashion all others records have, they all are related or linked to  their id and amount. We can see records’ arrangement in tree like format.

Advantages:-   1) easiest model of database.

                       2) Searching is fast if parent is known.

                       3) supports one to many relationship.

Disadvantages:       1) old and outdated one.

                             2) Can not handle many to many relationships.

                                 3) More redundancy.

8.What is networking? List out the advantages and disadvantages of networking.1+4
Ans:-
Networking:-

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)

Advantages:-

  1. Sharing devices such as printers saves money.
  2. Site (software) licences are likely to be cheaper than buying several standalone licences.
  3. Files can easily be shared between users.
  4. Network users can communicate by email and instant messenger.
  5. Security is good - users cannot see other users' files unlike on stand-alone machines.
  6. Data is easy to backup as all the data is stored on the file server.
Disadvantages:-

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.Explain the centralized and distributed database models.2.5+2.5
Ans:-

Following are differences between distributed and centralized database system.


Centralized system
Distributed System
1.Job is centralized.
1.Job is distributed.
2. Can not process if main server fails.
2. Can still be if a server fails;processing can be done by other servers.
3. Security is given to one machine.
3.Security is given to all.
4.No need to have network for communication.
4 Needs communication channel between all.
5.Not so expensive to set up.
5.It’s expensive to set up.
6.Data speed is comparatively fast.
6.Data speed is slow.
7.Low quality performance.

Diagrammatically it can be shown as



7.High quality performance.

Diagrammatically it can shown



10.Explain any two transmission media with appropriate diagrams.2.5+2.5

Ans:-
Lets know about guided medium.
Coaxial cable, or coax,
  • It is an electrical cable with an inner conductor surrounded by a flexible, tubular insulating layer, surrounded by a tubular conducting shield.
  • The term coaxial comes from the inner conductor and the outer shield sharing the same geometric axis.
  • Coaxial cable is used as a transmission line for radio frequency signals, in applications such as connecting radio transmitters and receivers with their antennas, computer network (Internet) connections, and distributing cable television signals and uses many connectors.
  • It is available in two types thin (10base2; means 100 MBPS and upto 200 meter) and thick (10base5 coax;means 10 MBPS, and upto 5oo meter). They are different in diameter and bandwidth. Most of television operators use this. They are obsolete and no longer in use for computer networking
    figure :coaxial cable

UTP:-
  • Unshielded Twisted pair cabling is a type of wiring in which two conductors (the forward and return conductors of a single circuit) are twisted together for the purposes of canceling out electromagnetic interference (EMI) from external sources; for instance, electromagnetic radiation from unshielded twisted pair (UTP) cables, and crosstalk between neighboring pairs. Different pairs(colour) have different function.It has 4-pairs of copper wires.
  • UTP cable is also the most common cable used in computer networking. Modern Ethernet, the most common data networking standard, utilizes UTP cables.
  • Twisted pair cabling is often used in data networks for short and medium length connections because of its relatively lower costs compared to optical fiber and coaxial cable.
  • It has bandwidth up to 100mbps but can be increased up to 10000 mbps.
  • The rate at which signal moves is ⅔ of velocity of light.
  • It is available in different categories like CAT5,CAT6 ,CAT7 etc


11.Differentiate between “While” and “Do-While” loop with flowchart.2.5+2.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:
#include<stdio.h>

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.

12.What is procedural oriented programming? Explain.5

Ans:-
Conventional programming using high level languages such as COBOL,FORTRAN and C, is commonly known as procedure oriented programming(POP).
                                       Procedure oriented programming basically consists of writing a list of instructions(or actions) for the computer to follow, and organizing these instructions into groups known as functions.While we concentrate on the development , very little attention is given to the data that are being used by various functions.
           Diagrammatically we can show POP as

Some characteristics (features) of Procedure Oriented Programming are :-
1) Emphasis is on doing things(algorithms).
2) Large programs are divided into smaller programs known as functions.
3) Most of the functions share global data.
4) Data more openly around the system from function to function.
5) Functions transform data from one form to another.
6) Employs top-down approach in program design.


13.What is AI? Explain the application areas of AI.1+4

Ans:-
A.I.
Artificial intelligence is where machines can learn and make decisions similarly to humans. There are many types of artificial intelligence including machine learning, where instead of being programmed what to think, machines can observe, analyse and learn from data and mistakes just like our human brains can. This technology is influencing consumer products and has led to significant breakthroughs in healthcare and physics as well as altered industries as diverse as manufacturing, finance and retail. In part due to the tremendous amount of data we generate every day and the computing power available, artificial intelligence has exploded in recent years. We might still be years away from generalised AI—when a machine can do anything a human brain can do—, but AI in its current form is still an essential part of our world.
Applications:-
game playing
You can buy machines that can play master level chess for a few hundred dollars. There is some AI in them, but they play well against people mainly through brute force computation--looking at hundreds of thousands of positions. To beat a world champion by brute force and known reliable heuristics requires being able to look at 200 million positions per second.
speech recognition
In the 1990s, computer speech recognition reached a practical level for limited purposes. Thus United Airlines has replaced its keyboard tree for flight information by a system using speech recognition of flight numbers and city names. It is quite convenient. On the the other hand, while it is possible to instruct some computers using speech, most users have gone back to the keyboard and the mouse as still more convenient.
understanding natural language
J
Just getting a sequence of words into a computer is not enough. Parsing sentences is not enough either. The computer has to be provided with an understanding of the domain the text is about, and this is presently possible only for very limited domains.
computer vision
The world is composed of three-dimensional objects, but the inputs to the human eye and computers' TV cameras are two dimensional. Some useful programs can work solely in two dimensions, but full computer vision requires partial three-dimensional information that is not just a set of two-dimensional views. At present there are only limited ways of representing three-dimensional information directly, and they are not as good as what humans evidently use
.
expert systems
A ``knowledge engineer'' interviews experts in a certain domain and tries to embody their knowledge in a computer program for carrying out some task. How well this works depends on whether the intellectual mechanisms required for the task are within the present state of AI. When this turned out not to be so, there were many disappointing results. One of the first expert systems was MYCIN in 1974, which diagnosed bacterial infections of the blood and suggested treatments. It did better than medical students or practicing doctors, provided its limitations were observed. Namely, its ontology included bacteria, symptoms, and treatments and did not include patients, doctors, hospitals, death, recovery, and events occurring in time. Its interactions depended on a single patient being considered. Since the experts consulted by the knowledge engineers knew about patients, doctors, death, recovery, etc., it is clear that the knowledge engineers forced what the experts told them into a predetermined framework. In the present state of AI, this has to be true. The usefulness of current expert systems depends on their users having common sense.
14.What are the components of multimedia? Explain.5

Ans:-
Multimedia:-
Multimedia is content that uses a combination of different content forms such as text, audio, images, animations, video and interactive content. Multimedia contrasts with media that use only rudimentary computer displays such as text-only or traditional forms of printed or hand-produced material.
Components:-
1)Text: Text is the most common medium of representing the information. In multimedia, text is mostly use for titles, headlines,menu etc. The most commonly used software for viewing text files are Microsoft Word, Notepad, Word pad etc. Mostly the text files are formatted with ,DOC, TXT etc extension.

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.
15.Write short notes on :

a) E-learning b) Data dictionary2.5+2.5
Ans:-
E-learning:-
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.

Data Dictionary:-
Database users and application developers can benefit from an authoritative data dictionary document that catalogs the organization, contents, and conventions of one or more databases. The term "data dictionary" is used by many, including myself, to denote a separate set of tables that describes the application tables. The Data Dictionary contains such information as column names, types, and sizes, but also descriptive information such as titles, captions, primary keys, foreign keys, and hints to the user interface about how to display the field.
          A super-simple beginning Data Dictionary might look like this:
                              Among other items of information, it records (1) what data is stored, (2) name, description, and characteristics of each data element, (3) types of relationships between data elements, (4) access rights and frequency of access. Also called system dictionary when used in the context of a system design.

                                   A data dictionary document also may include further information describing how data elements are encoded. One of the advantages of well-designed data dictionary documentation is that it helps to establish consistency throughout a complex database, or across a large collection of federated databases


------------------------------------
some sources:
collegenote.pythonanywhere.com
schoolofpoliticalscience.com
mygreatlearning.com
www.bbc.co.uk
other sites I donot know; But bucket of thanks!
etc





2 comments:

  1. Best merit casino【VIP】nba free spins
    Best free casino【VIP】nba free spins casino【VIP】nba free spins febcasino casino,nba free spins casino,nba free spins 메리트 카지노 주소 casino,nba free spins 메리트 카지노 casino,nba free

    ReplyDelete
  2. Baccarat Site - Jeff's Don Rausch
    Baccarat site, near the entrance to 메리트 카지노 쿠폰 the casino at the 바카라 주소 Borgata 퍼스트 카지노 Hotel Casino, has been opened for the 온라인 바카라 사이트 first time since opening 바카라 사이트 추천 in 1990.

    ReplyDelete