Gujarat Technological UniversityWinter 2024 examination

GTU BE01000121 Programming for Problem Solving Winter 2024 Question Paper & PDF

B.E. · Common Engineering · Semesters 1 and 2 · Subject code BE01000121
Download official PDFView PDF here
Share with your class
Total
70 marks
To pass
23 marks (33%)
Duration
2.5 Hours 10:30 AM – 1:00 PM
Questions
5 with internal choice
No solutions on this paper yetNeed them for your exam? Ask once. Papers that students ask for are solved first, and we aim to add them within 24 hours.

Q.1

14 Marks
(a)
3 marks
Write an algorithm to check whether the entered number is Even or Odd.
(b)
4 marks
Describe various symbols used for preparing flow chart.
(c)
7 marks

Explain different type of operators used in c language with their precedence and associativity.

Q.2

14 Marks
(a)
3 marks
Differentiate: Exit controlled Loop and Entry controlled Loop
(b)
4 marks
Explain:
abreak statement
bcontinue statement
(c)
7 marks
Write a C program to find factorial of a number.
(c)
7 marks

Construct a C program to swap the values of two integers with use of only two variables.

Q.3

14 Marks
(a)
3 marks
Demonstrate the use of conditional operator statement with an example.
(b)
4 marks
Explain the structure of switch case statement.
(c)
7 marks
Write a program to print the triangle shown below.

1 1 0 1 0 1 1 0 1 0 1 0 1 0

(a)
3 marks
Write a program to check whether entered character is vowel or not?
(b)
4 marks
Explain getch(), getchar(), gets(), puts() .
(c)
7 marks
Write a program to add all the elements of an array.

Q.4

14 Marks
(a)
3 marks

What is structure? Explain with example how to declare a structure and how to initialize it.

(b)
4 marks
Explain following string manipulation function.

strcat( ), strcpy( ) ,strcmp( ) and strlen( )

(c)
7 marks
Define a Structures which contains details of a Cricketer:
  • Name of Player:
  • Team name:
  • Total run scored:
  • Batting average:
(a)
3 marks
Debug the following codes and show the output for this:

For ( i=0 ; i<=50 ; i++ ); { printf( “\n %d” , i ) }

  • consider header files and declaration of variable is done.
(b)
4 marks
Summarize the methods for initialization of One-Dimensional array.
(c)
7 marks
Construct a C program to add 3X3 matrix.

Q.5

14 Marks
(a)
3 marks
Differentiate between structure and union.
(b)
4 marks
Explain fopen() and its mode with example.
(c)
7 marks
Briefly explain any two file handling functions with an example.
(a)
3 marks
Write True / False against following statements:
1)Pointer is a variable which holds address of location where value of other variable is stored.
2)Pointer holds the address in form of float or integer.
3)The address of a variable can be stored in two or more pointers.
(b)
4 marks

Write a C program to copy content of one file to other with the help of file handling functions.

(c)
7 marks

Develope a program in C to check the entered number is prime or not by creating a user-defined function named check_prime().

More Programming for Problem Solving papers

Questions repeat across sessions. Working through two or three papers shows you which topics GTU asks most.

Preparing with friends?

Send this paper to your class group. Every question has its own link.

About this paper

Official Gujarat Technological University (GTU) examination paper for Programming for Problem Solving (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.

ViewDownload PDF