0% found this document useful (0 votes)
43 views2 pages

Gujarat Technological University

Uploaded by

uttekarharshad85
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)
43 views2 pages

Gujarat Technological University

Uploaded by

uttekarharshad85
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

Seat No.: ________ Enrolment No.

___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–I & II(NEW) EXAMINATION – SUMMER 2023
Subject Code:3110003 Date:03-08-2023
Subject Name:Programming for Problem Solving
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
Marks
Q.1 (a) Design block diagram of computer and explain functionalities of various 03
components of computer.
(b) Write an algorithm to find maximum number for three given number. 04

(c) Write a C program to compute Fahrenheit from centigrade (f=1.8*c +32). 07

Q.2 (a) Differentiate: Exit controlled Loop and Entry controlled Loop 03
(b) Explain: 04
a) switch-case statement
b) continue statement
(c) Write a C program to find factorial of a number using recursion. 07
OR
(c) Write a C program to generate first n number of Fibonacci series using 07
recursion.( 0 1 1 2 3 5 8…)

Q.3 (a) Explain else… if ladder with an example. 03


(b) List out all operators and explain any two in details. 04
(c) Write a function in the C program to return 1 if number is prime 07
otherwise return 0.
OR
Q.3 (a) Explain Type casting in C with example. 03
(b) Explain the structure of for loop with proper example. 04
(c) What is function? Differentiate: Call by value and Call by reference. 07

Q.4 (a) Explain following terms: 03


a) break statement
b) getch() function
c) getchar() function

(b) Write a C program to print following patterns : 04


*
**
***
****
(c) Write a C program to copy one string to other without using string 07
handling function.

1
OR
Q.4 (a) List any three header file with its usage. 03
(b) Write a program to print following patterns : 04
1
22
333
4444
(c) Define a structure type struct personal that would contain person name, 07
date of joining and salary using this structure to read this information of
5 people and print the same on screen.

Q.5 (a) What is dynamic memory allocation? Show the use of malloc() and 03
calloc() function with their syntax.
(b) What is structure? How it is different from union? Explain nested 04
structure with example.
(c) Write a C program to check whether a number is prime or not. 07
OR
Q.5 (a) Explain following string handling functions: I. strcat() II. strcmp() III. 03
strlen
(b) What is Pointer in C and how it initializes? State its advantages. 04

(c) Write a C program to check whether a three digits number is palindrome 07


or not.

*******************************

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