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

Problem Solving Question

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Problem Solving Question

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

End Term Examination of Autumn Semester 2021

(For 1st Year 2nd Semester of 4-Year B.Tech)


Subject: Programming For Problem Solving Paper Code: CSEUGES01 /
Introduction To Computing /CSE102
Full Marks: 80 Time: 3 hours
__________________________________________________________________________________
Group - A
1) Answer all Questions (10x1=10)
a) which of the following is equivalent to the expression x % 8?
i) x – x*x/8 ii) x – 8*x/8 iii) 8 – 8*x/8 iv) None of these
b) 1 GB = (?) bits
i) 1000x1000x8 bits ii) 1024x1024x8 bits iii)1024x1024x4 bits iv) 1024 x 1024 x 1024 x 8 bits
c) Operating system is a
i) System software ii) Application Software iii) Hardware iv) Virus
d) What is the sizeof an array float a[10].
i) 4 Bytes ii) 40 Bytes iii) 20 Bytes iv) 80 Bytes
e) getch() is used for
i) ending a program ii) to scan a character iii) to see the output iv) generate the output
f) Find the output of the following C code
void main()
{
int i=3,prod;
prod= ++i*++i*++i;
printf(“%d”,prod);
}
i) 27 ii) 120 iii) 216 iv) None of these
g) Find the output of the following C code
void main()
{
int i=3,prod=10;
prod*= i+7;
printf(“%d”,prod);
}
i) 37 ii)100 iii) 73 iv) None of these
h) Macro expansion takes place
i) before Compilation ii) after Compilation iii) both before and after Compilation iv) not expanded
i) If the C program is saved as test.c the after execution which file/s will be present in the current directory
i) test.c only ii) test.obj only iii) test.exe only iv) All of these
j) Which types variables should be stored in a Register Storage class
i) Most frequently used variables ii) Least frequently used variables iii) variables not used at all iv) all
Group - B
Attempt any five questions (5 x 5 = 25)

2. Draw and describe the Vann Neumann architecture of a Computer system. Why it is called stored
program architecture? Is it essential to have memory in computer architecture? Justify your Answer
(2+1.5+1.5)
3. Differentiate between (2.5 x 2)
a) Call by Value and Call by reference
b) While and Do-While loop.
4. Write programs for the following (2.5 x 2)
a) To check whether a number is prime number or not.
b) Recursive function to generate GCD of two numbers.
5. a)Describe the functionality of Break, Continue and Exit with examples (3)
b)Write a program to print the following pattern. (2)
*
* *
* * *
* * * *
6. Write a C program to print the content of any text file. (5)

Group - C
Attempt any three Questions (15 x 3 = 45)

7) a) Differentiate between Structure and Union (2)


b) With examples state when to use Structure and When to use Union (2)
c) How can you use a function in any program? Is function prototype mandatory in to use user defined
function? Justify your answer. What are/is kept in header files? (2+2+2)
d) What is dot operator and arrow operator? Explain their usage with a small program. (5)

8) a) Write down the significance of base of number system and complements with example. (3)
b) Explain implicit type casting and explicit type casting with example. (2)
c) What is Pointer? What is the size of a pointer variable? Explain pointer arithmetic with example?
(1+1+3)
d) Explain pointer to pointer with example. (2)
e) Describe void and null pointer with suitable example. (3)
9)
a) Perform the following Conversions (5 x 2 = 10)
i) (35.21)8 = ( )2 Without using Decimal Number System.
ii) (28)5 = ( )6
iii) (31.75)10 = ( )2
iv) (38E.3C)16 = ( )10
v) (3.25) = (?)2 in IEEE 754 standard
b) Perform the following (2.5 x 2 = 5)
i) Convert (1100101000)2 to (?)4 directly.
ii) Subtract (11011)2 from (10001)2

10) a) Answer the following (2.5 x 4 = 10)


i) user defined function to find the length of a given string
ii) user defined function to compare two strings
iii)Sign extension and its mathematics
iv)Steps to subtraction using 2's complement method.
b) Write a C program to check whether a string is a palindrome or not. (5)
11) a) What is tag of a Structure? Is it essential to use tag for structure? Justify your answer with example.
(5)
b) What is carry? What is overflow? Are they same? Justify your answer with example. (5)
c) How integers are stored in Computer memory and why? How floating point numbers are stored? (5)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy