0% found this document useful (0 votes)
18 views

Basic of Computer and Programming I

sdf

Uploaded by

Adhikari Sushil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Basic of Computer and Programming I

sdf

Uploaded by

Adhikari Sushil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

POKHARA UNIVERSITY

Level: Bachelor Semester – Fall Year : 2009


Programme: BE Full Marks : 100
Course: Basic of Computer and Programming Time : 3hrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Attempt all the questions.

1. a. What do you mean by text editor? Define the following terms 5


i. Keywords
ii. DeMorgan’s law
iii. Documentation
b. What are the major characters of computer? Draw 5
neat and well labelled block diagram of computer
c. Write the function of the following MSDOS 5
commands with syntax.
i. Dir/ad ii. Copy con nec.txt
iii. Mem/c iv. Tree D: v. Label
2. a. Simplify by K map then draw circuit diagram 8
ABC  A BCD  ABC D  A BD  ABC D and
b. Why number system is essential for Computer Science. Define who
uses the major 4 number system with their application. 7
OR
What is an operator in C? Define various types of C operators with
appropriate examples.
3. a. Convert the following as indicated through notation 10
i. (CAB.CAFE)16 = (?)2er
ii. (111101.1011)2 = (?)10
b. Calculate the value and verify the result
i. 101111 ii. 110001 5
+111110 - 10101
------------------------ -----------------------

4. a. What are the final values of x, y, z , p and q after the execution of the 7
following statements? [7.5]
int x = 3, y = 1, z = 2, p, q;
p = x++ - ++y + z-- ;
q=x++ + -- p
q = ++p;
1
q %= (x-y)/2;
b. Trace the program and find the output : [7.5]
8
main()
{
int i = 1 , k = 4 ;
while ( i < 10)
{
i++;
if ( i % 5 = = 0)
k += i;
else
k - = 3;
printf(\n k = %d”,k );
}
printf(\n\n i = %d”, i);
}
5. a. Why NAND gate is called universal gate? Explain by realizing into 8
AND, OR & NOT gates.
OR
How does a C program execute in C Compiler? Define the stages of
source code execution with help of diagram. 7

b. What are the algorithms and flow chart? Illustrate them by flow chart 8
and an algorithm to identify the user given number is palindrome or
not.
OR
Write flowchart and then a program to read seven days temperatures then 7
compute the average, minimum and maximum temperature.
6. a. What are the basic data types in C programming language? Describe 7
the data types with their memory size and example.
b. Write a menu based program to display: [15]
i. Print first 10 odd numbers 8
ii. Testing a number 3 digits a number is Armstrong or not
iii. Printing multiplication table of user’s number n.
iv. Exit from program.
And perform task as per user’s choice number.
7. Writer Short note (Any Two) 2×5
a) Napier's Bones
b) Nested loop
c) Macros

You might also like