Year 2075 computer science questions
-----------------------------------------------
Group-A (4x10=40)
q1. a)What is loop? Differentiate between while and do while loop.(2+3)
b) Define the terms class and object [5]
q3. What is function? Explain any four string functions with example. [2+8]
q4. Write a program to input name, roll and regno of 10 student's using structure and display in proper format[10]
q5.What is normalization? Explain first second and third normal form with example. [2+8]
7. Define the terms DFD and E-R diagram. [2.5x2]
8. Differentiate between centralized and distributed database. [5]
9. Differentiate between peer-to-peer and client/server network. [5]
10. What is transmission media? Write advantages of optical fiber cable.[1+4]
11. What are the importance of OOP? [5]
12 Define the terms e-business and learning. [2.5x2]
13. Explain the social impact of ICT. [5]
14. What is multimedia? List the components of multimedia, [1+4]
15. Write short notes on:(2.5x2)
---------------------------------------------------------------------------------------------------------------------
Answer:
Group-A (4x10=40)
q1. a)What is loop? Differentiate between while and do while loop.(2+3)
Loop:-
Difference between while and do...while loop:
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. |
A function has 4 elements.
1. Function Declaration (Function Prototype)
2. Function Call
3. Function Definition
For example,
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:-
1 NF:
A TABLE IS SAID TO BE IN 1n IF there is not repeating groups or information in a table..Here, repeating group means a set of columns that stores similar information that repeats in the same table.
Let’s consider following SQL commands.
Create table contacts
(
Contact Id Integer not null,
L_name varchar(20) not null,
F_name varchar(20)
Contact_date1 date,
Contact_desc1 varchar(50),
Contact_date2 date,
Contact_desc2 varchar(50),
);
We can see here in this table that there is a repeating group of date and description.
Now to convert into 1 N, we have to make a new table and shift that repeating group into new table.
Like,
Create table contacts
(
Contact_ID integer not null,
L_name varchar(20) not null,
F_name varchar(20)
);
Create table conversation
(
Contact_id integer not null,
Contact_date date,
Contact_desc varchar(50)
);
A table is said to be in 2 N if it is in 1N and there is no redundant data in table i.e. if a value of column is dependent on one column(primary key only) but not another.
For example:
Create table employee
(
Emp_no integer not null,
L-name varchar(20) not null,
F_name varchar(20),
Dept_code integer,
Description varchar(50),
);
This table contains redundant data i.e. the value of column(field) “description” depends on dept_code but does not depend on primary key “emp_no”.So let’s make a new table and shift them into that.
Create table employee
(
Emp_no integer not null,
L_name varchar(20) not null,
F_name varchar(20),
Dept_code integer,
);
Create table department
(
Dept_code integer not null,
Description varchar(50) not null,
);
We got two tables named employee and department with fields. Both the tables are related by primary key called dept_code. Now there is no redundancy and table is in 2N.
An entity is said to be in the third normal form when,
1) It satisfies the criteria to be in the second normal form.
2) There exists no transitive functional dependency. (Transitive functional dependency can be best explained with the relationship link between three tables. If table A is functionally dependent on B, and B is functionally dependent on C then C is transitively dependent on A and B).
Example:
Consider a table that shows the database of a bookstore. The table consists of details on Book id, Genre id, Book Genre and Price. The database is maintained to keep a record of all the books that are available or will be available in the bookstore. The table of data is given below.
Book id | Genre id | Book genre | price |
121 | 2 | fiction | 150 |
233 | 3 | travel | 100 |
432 | 4 | sports | 120 |
123 | 2 | fiction | 185 |
424 | 3 | travel | 140 |
The data in the table provides us with an idea of the books offered in the store. Also, we can deduce that BOOK id determines the GENRE id and the GENRE id determines the BOOK GENRE. Hence we can see that a transitive functional dependency has developed which makes certain that the table does not satisfy the third normal form.
Book id | Genre id | price |
121 | 2 | 150 |
233 | 3 | 100 |
432 | 4 | 120 |
123 | 2 | 185 |
424 | 3 | 140 |
table book
Genre id | Book genre |
2 | fiction |
3 | travel |
4 | sports |
table genre
After splitting the tables and regrouping the redundant content, we obtain two tables where all non-key attributes are fully functional dependent only on the primary key.
When all the column in a table describe and depend upon the primary key,the table is 3N.
Group-B (short questions) (7x5=35)
6. Who is system analyst? Explain the role of system analyst. [1+4]
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.
A data flow diagram (DFD) is a design tool to represent the flow of data through an information system. With a dataflow diagram, developers can map how a system will operate, what the system will accomplish and how the system will be implemented. It is implemented in 1 and 2 level. Whereas at 0 level , it is context diagram. We can use different symbol like:
Rectangle----->entities or data source
rectangle with process no. and description and doer name side by--------> shows about processes and number
open rectangle with identifier and name where to store -------------> storing somewhere,may be electronic media or a database.
arrow:- shows about movement of data/flow
DFD-0 level:-
- 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.
8. Differentiate between centralized and distributed database. [5]
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 |
- In this all the computers are treated equally.
- No one computer is server or client.
- All computers can be said working as client or server.
- Computers have self processing capability and do not rely on others.
- Computers have or can run with normal operating system like, XP, Me etc and application.
- Easy sharing of files and allows us to have chatting.
- failure of one does not mean others are down; networking goes on.
- If heavy load is given, they may not give same performance. etc
- low level security.
- In this, one or two computers work as server and left all work as clients.
- Clients computers give request to server for a task to be performed.
- Clients computers may or may not have self processing capability. they rely on server.
- Mostly servers use a powerful operating system like, Linux or Unix or Win advanced server2008 etc.
- Through server, the sharing of files is done.
- Everything is controlled by server so in the case of down, services can not be completed.
- under heavy load, many servers share the tasks.
- there is high level security in networking.
- High traffic towards servers while processing.
or we can also say,The transmission medium can be defined as a pathway that can transmit information from a sender to a receiver. Transmission media are located below the physical layer and are controlled by the physical layer. Transmission media are also called communication channels.
- Better bandwidth. Fibre optic cables have much greater bandwidth than metal cables. ...
- Higher bandwidth means faster speed. ...
- Longer transmission distances. ...
- Greater flexibility.
- Improved latency.
- Stronger security.
11. What are the importance of OOP? [5]
The following are the different types of e-commerce platforms:
13. Explain the social impact of ICT. [5]
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
Negative impacts in society:
1.Spamming
Spamming refers to sending unwanted emails in bulk, which provide no purpose and needlessly obstruct the entire system. Such illegal activities can be very frustrating for you as it makes your Internet slower and less reliable.
2.Virus Threat:
Internet users are often plagued by virus attacks on their systems. Virus programs are inconspicuous and may get activated if you click a seemingly harmless link. Computers connected to Internet are very prone to targeted virus attacks and may end up crashing.
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.
- Artificial Intelligence Influences Business
- Life-Saving AI
- Entertaining AI
- e-mail communications
- self driving cars and buses
- Navigation
- web searchingetc
Internet connectivity occurs through a wireless router. When you access Wi-Fi, you are connecting to a wireless router that allows your Wi-Fi-compatible devices to interface with the Internet.
It works using access point.What a wireless access point does for your network is similar to what an amplifier does for your home stereo. An access point takes the bandwidth coming from a router and stretches it so that many devices can go on the network from farther distances away. But a wireless access point does more than simply extend Wi-Fi. It can also give useful data about the devices on the network, provide proactive security, and serve many other practical purposes.
No comments:
Post a Comment