Gujarat Technological UniversityWinter 2024 Examination

GTU 3110003 Programming for Problem Solving (PPS) Winter 2024 Paper Solution & PDF

B.E. · Common Engineering · Semester 1 · Subject Code: 3110003
Download Official GTU PDF
Share:
Total Marks70 MarksExternal theory exam
Passing Marks23 Marks33% minimum cutoff
Exam Duration2.5 Hours10:30 AM – 1:00 PM
Paper Structure5 QuestionsWith internal OR choices
Jump toQ1Q2Q3Q4Q5

Question 1

14 MarksMedium
(a)
What is Software? List various types of Software.
3 Marks
(b)
Define following terms:
1Compiler
2Runtime Error
3Dynamic Memory Allocation
4Recursion
4 Marks
(c)

Write an algorithm and draw the flowchart to calculate sum of digits of a given number N.

7 Marks

Question 2

14 MarksMedium
(a)
Explain the basic structure of a C program with an example.
3 Marks
(b)
Evaluate given C programming Expressions :
1Ans = 10 + 4 * 3 / 2;
2Ans = while(1);
3Ans = 3 * 2 > 3 + 1;
4Ans = (2 + 4) > 3 && 2 < 4;
4 Marks
(c)
Write a C program to print the following pattern as output:

A B C D E F G H I J

7 Marks
OR OPTION
(c)

Write a C program that takes three coefficients (a, b and c) of a quadratic equation ; (a.x2 + b.x + c) as input and compute all possible roots and print them with appropriate messages.

7 Marks

Question 3

14 MarksMedium
(a)
Differentiate while loop and do..while loop with example.
3 Marks
(b)
What is type conversion? Explain two types of conversion with examples.
4 Marks
(c)

Write a C program which takes marks (between 0 to 100) of a student for N subjects. It should print grade of a student based on Percentage of Student's marks . "A" for >=85%, "B" between >=70% and <85%, "C" between >=50% and <70%, "PASS" between >=35% and <50%, "FAIL", if any one subject marks are <35.

7 Marks
OR OPTION
(a)

What is function? How Call by value and Call by reference passes the argument in function.

3 Marks
(b)
What are the steps in writing a recursive function in a program?
4 Marks
(c)
Write a program in C to calculate the power of any number using recursion.
7 Marks

Question 4

14 MarksMedium
(a)
What is string ? How to declare string in C?
3 Marks
(b)
Explain significance of following string functions with example.
1strcat()
2strlen()
3strcpy()
4strcmp()
4 Marks
(c)

Write a C program ,that reads a statement from user and prints the frequency of each of the distinct character from a-z.

7 Marks
OR OPTION
(a)
Compare Array, Structure and Union.
3 Marks
(b)

Define Union. Describe how to declare, initialize and access members of Union with a programming example.

4 Marks
(c)

Write a C program which takes two NxN matrices and performs matrix multiplication.

7 Marks

Question 5

14 MarksMedium
(a)
What is a pointer? What are the advantages of using pointer?
3 Marks
(b)

Explain need of Dynamic Memory allocation. Compare malloc(), calloc() and realloc() functions.

4 Marks
(c)

Write a C program to find the sum and mean of all elements in an array using pointer.

7 Marks
OR OPTION
(a)
What is File Pointer? What is significance of File Pointer?
3 Marks
(b)
Explain signification of following functions in file operations.
1fseek()
2ftell()
3open()
4fread()
4 Marks
(c)

Write a C program to read ID and marks of n number of students from user and store them in a file.

7 Marks
College Exam Groups

Studying for Programming for Problem Solving?

Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.

About this Examination Paper & Attribution

Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Programming for Problem Solving (PPS) (Winter 2024, B.E. · Common Engineering, Sem 1). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.

Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.

Download PDF