We are Permanently Move to vupk.net Please Join us there.

CS201 Mid Term Solved Paper 2009 - 1

CS201- Introduction to Programming
MIDTERM EXAMINATION

Spring 2009 Paper
 
CS201 - Introduction to Programming - Question No: 1 ( M a r k s: 1 ) http://vuzs.net
The function of cin is
To display message
To read data from keyboard
To display output on the screen
To send data to printer

 
CS201 - Introduction to Programming - Question No: 2 ( M a r k s: 1 ) http://vuzs.net
In C/C++ language the header file which is used to perform useful task and manipulation of character data is
cplext.h
► ctype.h
stdio.h
delay.h
The functions toupper and islower are part of the character handling library <ctype.h>

CS201 - Introduction to Programming - Question No: 3 ( M a r k s: 1 ) http://vzs.net
How many parameter(s) function getline() takes?
0
1
2
► 3

inFile.getLine(name, maxChar, stopChar); The first argument is a character array, the array should be large enough to hold the complete line. The second argument is the maximum number of characters to be read. The third one is the character if we want to stop somewhere.
CS201 - Introduction to Programming - Question No: 4 ( M a r k s: 1 ) http://vuzs.net
Word processor is
Operating system
Application software
Device driver
Utility software

 www.vuzs.net
 
CS201 - Introduction to Programming - Question No: 5 ( M a r k s: 1 ) http://vuzs.net
For which values of the integer _value will the following code becomes an infinite loop?
int number=1;
while (true) {
cout << number;
if (number == 3) break;
number +=integer_value; }

any number other than 1 or 2
only 0
only 1
only 2
Rational:
number +=integer_value
above line decide the fate of loop so any thing other then zero leads to value of 3 which will quite the loop. Only zero is the value which keeps the loop infinite.


CS201 - Introduction to Programming - Question No: 6 ( M a r k s: 1 ) http://vuzs.net
Each pass through a loop is called a/an
enumeration
Iteration
culmination
pass through
 
CS201 - Introduction to Programming - Question No: 7 ( M a r k s: 1 ) http://vuzs.net
A continue statement causes execution to skip to
the return 0; statement
the first statement after the loop
the statements following the continue statement
the next iteration of the loop

Ref. continue statement is used, when at a certain stage, you don’t want to execute the remaining statements inside your loop and want to go to the start of the loop.

CS201 - Introduction to Programming - Question No: 8 ( M a r k s: 1 ) http://vuzsnet
What is the correct syntax to declare an array of size 10 of int data type?
int [10] name ;
name[10] int ;
int name[10] ;
int name[] ;
 
CS201 - Introduction to Programming - Question No: 9 ( M a r k s: 1 ) http://vuzs.net
Consider the following code segment. What will the following code segment display?
int main(){
int age[10] = {0};
cout << age ;
}
Values of all elements of array
Value of first element of array
► Starting address of array
Address of last array element
 
CS201 - Introduction to Programming - Question No: 10 ( M a r k s: 1 ) http://vuzs.net

What will be the correct syntax to initialize all elements of two-dimensional array to value 0?
► int arr[2][3] = {0,0} ;
int arr[2][3] = {{0},{0}} ;
int arr[2][3] = {0},{0} ;
int arr[2][3] = {0} ;
 
CS201 - Introduction to Programming - Question No: 11 ( M a r k s: 1 ) http://vuzs.net
How many bytes will the pointer intPtr of type int move in the following statement?
intPtr += 3 ;
► 3 bytes
6 bytes
12 bytes
24 bytes
ref. one int is 4 bytes so 4*3 = 12 bytes movement.

CS201 - Introduction to Programming - Question No: 12 ( M a r k s: 1 ) http://vuzs.net
If there are 2(n+1) elements in an array then what would be the number of iterations required to search a number using binary search algorithm?
► n elements
(n+1) elements
2(n+1) elements
2(n+1) elements
 
CS201 - Introduction to Programming - Question No: 13 ( M a r k s: 1 ) http://vuzs.net

Which of the following operator is used to access the value of variable pointed to by a pointer?
* operator
-> operator
&& operator
► & operator
 
CS201 - Introduction to Programming - Question No: 14 ( M a r k s: 1 ) http://vuzs.net
The ________ statement interrupts the flow of control.
 
switch
continue
goto
break
 
CS201 - Introduction to Programming - Question No: 15 ( M a r k s: 1 ) http://vuzs.net
Analysis is the -------------- step in designing a program
Last
Middle
Post Design
First
ref. analysis will be always followed by design and then code.

CS201 - Introduction to Programming - Question No: 16 ( M a r k s: 1 ) http://vuzs.net
Paying attention to detail in designing a program is _________
Time consuming
Redundant
► Necessary
Somewhat Good
Reference : In programming, the details matter. This is a very important skill. A good programmer always analyzes the problem statement very carefully and in detail. You should pay attention to all the aspects of the problem.

CS201 - Introduction to Programming - Question No: 17 ( M a r k s: 1 )
Which programming tool is helpful in tracing the logical errors?
Debugger is used to debug the program i.e. to correct the

CS201 - Introduction to Programming - Question No: 18 ( M a r k s: 1 )
Give the syntax of opening file ‘myFile.txt’ with ‘app’ mode using ofstream variable ‘out’.
out.open(“myfile.txt” , ios::app);

CS201 - Introduction to Programming - Question No: 19( M a r k s: 2 )
What is the difference between switch statement and if statement.

The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.
CS201 - Introduction to Programming - Question No: 20  ( M a r k s: 3 )   http://groups.google.com/group/vuZs
Identify the errors in the following code segment and give the reason of errors.
main(){
int x = 10
const int *ptr = &x ;
*ptr = 5 ;
}



Answer
*ptr = 5;

declaring a pointer to a constant Integer. You cannot use this pointer to change the value being pointed to:


CS201 - Introduction to Programming - Question No: 21  ( M a r k s: 5 )
If int array[10]; is an integer array then write the statements which will store values at Fifth and Ninth location of this array,

arrary[4] = 200;
arrary[8] = 300;

CS201 - Introduction to Programming - Question No: 22 ( M a r k s: 10 )

Write a function BatsmanAvg which calculate the average of a player (Batsman), Call this function in main program (Function). Take the input of Total Runs made and Total number of matches played from the user in main function
#include <iostream.h> // allows program to output data to the screen

// function main begins program execution
int BatsmanAvg(int TotalRuns, int TotalMatches) ;

main()
{
int stopit;
int TotalRuns, TotalMatchesPlayed =0;
cout << "Please Entere the total Runs made :" ;
cin>> TotalRuns ;
cout << "Please Entere the total match played :" ;
cin>> TotalMatchesPlayed ;
cout << "\n Avg Runs = " << BatsmanAvg(TotalRuns,TotalMatchesPlayed);
cin>> stopit; //pause screen to show output
}

int BatsmanAvg(int TotalRuns, int TotalMatches)
{
returnTotalRuns/TotalMatches;

}

CS101 Subjective Questions Solved 2012

CS101 Introduction to Computing Principles 

Subjective Solved Question from 2012 Exam


Question 1 (Marks 5)In an organization having hierarchical structure, higher management plays very vital role for the organization. Provide the designation description of the higher management personal of an organization with their responsibilities and abilities.

Answer:
Top-level management is also known as senior management or executives and hold titles such as:
  • Chief Executive Officer (CEO),
Develop strategic plans, make decisions for entire firm. They are master strategists.
  • Chief Operational Officer (COO) or Senior Vice President
Controls and concerned with sale, marketing and production etc.
  • Board of directors,
Establish policies and appoint or select the Chief executive of the firm.
  • President
 Provides corporate leadership.
  • Vice president,
Report to president or CEO and commands the overall business, can be vice president of finance, marketing, IT etc
Question No.2 (5 Marks)
Explain how a relational DBMS deals with the object oriented data and what is the drawback of RDBMS in handling such data?
Answer
RDBMS software are developed using object oriented technique which allows, creating, modifying and querying the relational database.
DRAWBACK: the main drawback is wastage of time in translating the codes as, when we try to store the object-oriented data into RDBMS we have to translate it into suitable form for RDBMS and to read and use that data this RDBMS data has to be translated back into object-oriented form. 
Question No.3 (5 Marks)
In comparison with old modes of presentation, the current multimedia mode of presentation has some advantages over them. Describe any five advantages of using the multimedia mode of presentation.
Answer:
Advantages of multimedia mode of presentation are as follows:
  1. Last minute changes can be done easily.
  2. Having sound, animation and videos
  3. Easy to store and recall, by storing the main points or idea.
  4. Everything is electronically transmitted.
  5. Having Undo option which promotes experimentation and innovation.
  6. More attractive and understandable than older modes of presentation. 
Question No.4 (5 Marks)
Suppose a developer has to write pseudo code for a software project. Suggest any five tips to write it in better way.
Answer:
Following are five tips to write Pseudo Code for a software project in better way:
1. Declare the array that will be used for storing the words
2. Prompt the user and read the user input into the elements of the array
3. Now write the array to the document
4. Sort the array
5. Write the sorted array to the document.
 
Question No.5 (5 Marks)
As a database administrator, name any three techniques you can use to restrict the unauthorized access to your database.
Answer:
This problem can be managed by using appropriate security mechanisms that provide access to authorized persons/computers only Security can also be improved through:
Encryption
Private or virtual-private networks
Firewalls
Intrusion detectors
Virus detectors
 
Question No.6  (3 Marks)
Write any six string HTML wrapper methods.
Answwer:
Following are the six string HTML wrapper methods:
DoubleValue,
floatValue,
longValue,
parseXxx,
getXxx,
toString,
toHexString 

Question No.7  (5 Marks)
Differentiate onFocus and onBlur.
Answer:
onFocus & onBlur:
• onFocus executes the specified JavaScript code when a window receives focus or when a form element receives input focus
• onBlur executes the specified JavaScript code when a window loses focus or a form element loses focus

Question No.8 (3 Marks)
Describe the aspect of web design which plays important role in providing the relevant stuff from a website in minimum time.
Answer:
Website Navigation:
The interface/controls that a Website provides to the user for accessing various parts of the Website
It probably is the most important aspect of the design of a Website

Question No.9 (2 Marks)
Just name the errors which can occur on:
1)      Executing the statement:
X= y-/z
2)      Accessing a non existing variable.
Answer:
1) Executing the statement: X= y-/z
ANS    Syntax Error
2) Accessing a non existing variable.
ANS    Run-Time Error
Question No.10 (5 Marks)
Every organization is based on some type of organizational structure. Briefly describe the organizational structure which has more preference over others.
Answer:
Preferred Organizational Structure for organization is hierarchal. Where there are different departments interlinked with each other and are been divided according to the functions they perform

Question 11 (Marks 2)
There are many useful Neural Network Paradigms. Define the most popular Neural Network Paradigm.
Answer:
Many useful NN paradigms, but scope of today's discussion limited to the feed-forward network, the most popular paradigm
Feed-forward Network:
It is a layered structure consisting of a number of homogeneous and simple (but nonlinear) processing elements

Question 12 (Marks 2)
Distinguish the terms World Wide Web and internet.
Answer:
The World Wide Web
• A huge resource of info
• Logically unified, but physically distributed
• It is unlike any previous human invention:
– It is a world-wide resource, important to all and shared by all of the people in the world 
Internet is where I am having exam now it provides access to the rest
of digital world e.g:- world wide web

CS101 Midterm Paper Solved 2009 - 4

Cs101 - Introduction to Computing Midterm Paper 2009



Q1
Cray-1 was first commercial _________ computer
(a)Super                                                                                                      page 16

(b)Mini
(c)Micro
(c)Personal


Q2
Browser is a __________________ used for browsing.
(a)   Tool   doubt

(b)   Component
(c)    Device
(d)   None of the given choices doubt

3.1 Browser page 18

A browser is an application program that provides a way to look at and interact with all

The information on the World Wide We
Q3 The name of first browser was ______

(a)   Internet Explorer
(b)   Mosaic
   Reference Handouts Page 18
(c)    Netscape
(d)   Fire fox

Q4 Which of the following hardware component of a computer can also be called as engine?
(a)   Bus
(b)   Storage
(c)    Memory
(d)   Processor


Q5
The impact of a digit in a number is determined by its ---------------
(a)   Value

(b)   Location
(c)    Length
(d)   None of above

Q6


This element of Flow Chart is called_____________.

(a)  Process
(b)  Off-page Connector                                                                                page 105

(c)  Decision
(d)  Connector

Q7

The sequence of phases, a software goes through from the concept to decommissioning, is called

(a)    Software composition
(b)   Software life-cycle                                                                                page 133

(c)    Software methodology
(d)   Software development steps

Q8 - In JavaScript, a variable declaration is
(a)   Optional                                                                                             page 144

(b)   Mandatory
(c)    Not allowed
(d)   None of the given
 
21.2 Declaring Variables
Many languages require that a variable be declared (defined) before it is first used
Although JavaScript allows variable declaration, it does not require it -

Q9
____________ interacts directly with the computer Hardware

(a)    Compiler
(b)   Operating system

(c)    Application software
(d)   Assembler

Q10

Which of the following is/are the parts of Operating system components?
(a)    GUI
(b)   Device Manager
(c)    Shell
(d)   All of these

Q11

Tag used for the highest level Heading is ________________
(a) 
(b) 
(c)   

(d)   . None of these  

Q12
The programming language specifically designed by the US Department of Defense for developing military applications was named ___________.
(a)    Smalltalk
(b)   C
(c)    C++
(d)   Ada                                                                                                              page 9
Q13

------------ is volatile memory
(a)   RAM                                                                                                         page 25

(b)   ROM
(c)    Hard Disk
(d)   Hard Disk

Q14
The key strengths of computers are
(a)    Speed
(b)   Storage
(c)    Do not get bored
(d)   All of the given choices

Q15

_____ is an application program that provides a way to look at and interact with all the information on the World Wide Web

(a)    URL
(b)   Browser

(c)    HTML
(d)   Website

Q16

______ is a client program that uses HTTP to make requests to Web servers throughout the internet on behalf of the user.
(a)    Web Application
(b)   Web Browser                                                                                     page 18

(c)    Internet Application
(d)   HTML

Q17
___ contains the name of the protocol required to access the resource, a domain name that identifies a specific computer on the internet and a pathname on the computer
(a)    HTML
(b)   HTTP
(c)    URL
page 18
(d)   WWW

Q18

To start an ordered list from 20 instead of 1, we will write
(a)  
(b) 
(c)   

(d) 


Q19

_________ is the interface in computer that supports transmission of multiple bits at the same time.
(a)    Serial Port
(b)   Parallel Port                                                                                       page 24

(c)    Universal Serial Bus
(d)   None of the given choice

Q20.

Monitor is an example of:

(a)    Input Device
(b)   Processing Device
(c)    Output Device

(d)   Storage Device

Q21

Different parts or components of computer use ­­                    as a communication path

(a)    RAM
(b)   Bus

(c)    ROM
(d)   Processor

Q22

There is a battery on the motherboard to:

(a)    Give power to the processor
(b)   Save information when computer is off

(c)    Save information when computer is on
(d)   Give power to the motherboard

Q23

In which case Cache Memory is used
(a)    To increase RAM speed
(b)   To overcome BUS speed
(c)    To overcome Speed rate between RAM and CPU

(d)   To overcome CPU speed

Q24
Using COLSPAN, number of rows of the current cell should extend itself
(a)    Upward
(b)   Downward
(c)    Both Upward and Downward
(d)   None of the given choices       

Q25

Operating System talks to and manages devices through
(a)    Loader
(b)   File Manager
(c)    Memory Manager
(d)   Device Driver


Q26
Pseudo code is written in
(a)    Complex grammar
(b)   Plain English

(c)    JAVA
(d)   Pseudo language

Q27

What is Object in JavaScript ?

Solution:-

Everything that JavaScript manipulates, it treats as an object – e.g. a window or a button

An object has properties – e.g. a window has size, position, status,

Q28

Write one purpose of using spreadsheets?

Solution:-

Electronic replacement for ledgers, Used for automating engineering, scientific, but in majority of cases, business calculations, A spreadsheet - VisiCalc - was the first popular application on PC’s. It helped in popularizing PC’s by making the task of financial-forecasting much simpler, allowing individuals to do forecasts which previously were performed by a whole team of financial wizard

 
Q29

Write one purpose of using spreadsheets?

Solution:-

Electronic replacement for ledgers, Used for automating engineering, scientific, but in majority of cases, business calculations, A spreadsheet - VisiCalc - was the first popular application on PC’s. It helped in popularizing PC’s by making the task of financial-forecasting much simpler, allowing individuals to do forecasts which previously were performed by a whole team of financial wizard

Q30

How a designer makes Structured Design?

Solution:-

Also called top-down design, The designer starts by first conceiving a skeleton high-level design of the system, and then starts defining features of that over-all design in an ever-increasing detail Making small changes in the functionality of the systems sometimes leads to major redesign exercise. Structured design emphasizes separating a program's data from its functionality


Q31

What is the difference between High-level and Low-level programming languages?

Solution:-

High language can be easily understood by human beings. But low level language is machine langue, but we can understand it. Because low level language is machine langue

Q32

What are the main responsibilities that Kernel plays in Operating system?

Solution:-

Responsible for all the essential operations like basic house keeping, task scheduling, etc Also contains low-level HW interfaces Size important, as it is memory-resident