Wednesday, 22 January 2014

CSC 102 CURRENT PAST QUESTIONS AND ANSWERS


1.       What is Microcomputer? How do microcomputers differ from mainframe computers?
ANSWER: A microcomputer is simply a system based on microprocessor usually small and inexpensive.
Microcomputer is a single user system while mainframe is a multiuser system, Microcomputer is portable and inexpensive, Mainframe uses magnetic tapes and disks as data storage, Mainframe requires special environment to work.
2.       Differentiate low level language from high level language?
ANSWER: low level languages (assembly and machine language) are machines dependent but execute faster than high level language because the latter is the actual language of the system while former has a one to one relationship
High level languages are problem oriented and written using English-like expressions and arithmetic operations
3.       Write LET statements that correspond to each of the following algebraic equations
R = (P + q) ½
                P = Ai (1 + i)n/[(1 + i)n - 1]
                ANSWER:
LET R = (P + q)^0.5
                LET P = Ai * (1 + i)^n/((1 + i)^n - 1]
4.       What is a logical error? Differentiate logical error from syntax error?
ANSWER: A logical error occurs when the programmer supplied instruction that are logically incorrect and such error may be difficult to detect.
Syntax error occurs as a result of misspelled keywords, reference to undefined variables, unbalance parentheses, incorrect punctuations, among others which will prevent the program from compiling successfully, while logical error will not halt compilation process but result in incorrect results.
5.       Point out the errors in this program. Correct this and determine the output
LET M = 6
IPUT “Enter a positive integer number” N --- ANSWER: N is missing in IPUT and a semicolon
FROM J = 1 TO M (FOR instead of FROM)
LET N = N + J; --- ANSWER: semicolon not required
PRN “VALUE OF N” WHEN J = “, J” IS ”: N ---- ANSWER: PRINT is the correct keyword not PRN and ‘’ is not required before WHEN.
(Missing next statement)
END
                CORRECT PROGRAM CODE
                                LET M = 6
                                INPUT “ENTER A POSITIVE INTEGER NUMBER” ;N
                                FOR J  = 1 TO M
                                LET N =  N + J
                                PRINT ‘’VALUE OF N WHEN J = “, J; “IS”; N
                                NEXT J
                                END
                SOLUTION
                ENTER A POSITIVE INTEGER NUMBER 5 (THE OUTPUT DEPENDS ON THE INPUT VALUE OF N)
                VALUE OF N WHEN J = 1 IS 6
                VALUE OF N WHEN J = 1 IS 8
                VALUE OF N WHEN J = 1 IS 11
VALUE OF N WHEN J = 1 IS 15
VALUE OF N WHEN J = 1 IS 20
VALUE OF N WHEN J = 1 IS 26
6.       Write an appropriate IF-THEN statement or an IF-THEN-ELSE block for each of the following situations.
Test the value of variable total, if total is less than or equal to 100, add the value of the variable to total and display the value. If total exceeds 100, then display its value, add its value so that it equals 100 and then display the new value.
                ANSWER:
                IF (total <=100) THEN
                                Total v + total
                                PRINT total
                ELSE
                                PRINT total
                LET total = 100  
                PRINT total
                ENDIF
Suppose the variable pay has been assigned a value of 450. Test the value of the variable hours. If hours exceed 40, assign the value 625 to pay
ANSWER:
                LET PAY = 450
                IF (hours > 40) THEN
                                PAY = 625
                ENDIF
7.       State the role of an operating system
ANSWER: Memory management, Processor management, I/O management and file management.
8.       List any five visual basic controls contained on the toolbox
ANSWER: text box, label, command button, list box, image, picture, frame
9.       Explain the term algorithm and itemize the steps involved in programming
ANSWER: Algorithm is a finite set of well-defined rules for the solution of a problem in a finite numbers of steps.
Steps:
Problem definition
Devising the solution method
Developing the method using suitable aids
Writing the instructions in a programming language.
Debugging the program
Testing the program
10.   Define computer software and explain two major groups of software
ANSWER: Software are programs, procedures, rules and any associated documentation pertaining to the operation of a computer system

Application Software – designed to be put to specific practical use. Examples of application packages include excel, word processing and specialize application like payroll system

System Software – controls the way the computer operates or provides facility which extends the general capabilities of the system. Examples are operating system, translators, utilities and service programs.
11.   Write DOS command equivalent to the following
ANSWER:
Copy all files with filename extension BAS from the root directory to CSC 202 subdirectory
                C:\>COPY *.BAS\CSC 202
Delete all files whose names begins with dot regardless of the filename extension
C:\>del dot.*
12.   With the aid of an example, explain the term system configuration.
ANSWER:
System configuration can be referred to as specification of a typical system, which include memory capacity – RAM and hard disk, processor type and speed, operating system among others e.g Intel core i7 200Ghz, 6GB RAM, 640GB HDD, windows 7 O/S

No comments:

Post a Comment