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

Jalpaiguri Reserch Paper

The document appears to be a programming exam for students containing multiple choice and long answer questions related to C programming. Some of the topics covered in the questions include: bitwise operators, arrays, strings, loops, functions, recursion, structures, pointers, operator precedence and more. Students are asked to write code snippets and full programs to demonstrate their knowledge of these C programming concepts. The exam is divided into two sections - Section A contains short multiple choice questions worth 2 marks each, while Section B contains longer answer type questions worth 15 marks each, requiring code writing and explanations.

Uploaded by

subhajitbaddhuk
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)
35 views2 pages

Jalpaiguri Reserch Paper

The document appears to be a programming exam for students containing multiple choice and long answer questions related to C programming. Some of the topics covered in the questions include: bitwise operators, arrays, strings, loops, functions, recursion, structures, pointers, operator precedence and more. Students are asked to write code snippets and full programs to demonstrate their knowledge of these C programming concepts. The exam is divided into two sections - Section A contains short multiple choice questions worth 2 marks each, while Section B contains longer answer type questions worth 15 marks each, requiring code writing and explanations.

Uploaded by

subhajitbaddhuk
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

JALPAIGURI GOVERNMENT ENGINEERING COLLEGE

[A GOVERNMENT AUTONOMOUS COLLEGE]


JGEC/B.TECH./CSE/ECE/IT/ES-CS201/2022-23
2023
PROGRAMMING FOR PROBLEM SOLVING

Full Marks: 70 Times: 3 Hours


The figures in the margin indicate full marks.
Candidates are requested to write their answers in their own words as far as practicable.

GROUP-A
[OBJECTIVE TYPE QUESTIONS]
Answer all questions 5x2=10
1. Convert (52479)10 =(?)8

2. Differentiate between break and continue with suitable example?

3. Which will be the access specifier and according output?


char name[ ]= “Computer Science”;
printf(“% ”,*name);

4. #define CAL(x) (x*10)


void main( )
{
int a=3, b;
b= CAL(a + 2);
printf(“\n%d”,b);
}
What will be the output?

5. Which of the following operator takes only integer value


a) + b) - c) % d) /

GROUP-B
[LONG ANSWER TYPE QUESTIONS]
Answer any four questions 4x15=60
6. i) Write down the difference between while loop and do while loop with suitable example.
ii) Write a C program to calculate the length of the string without using library function strlen()?
iii) Write about the different bitwise operators and their function with suitable example.
iv) Let a 2 D array is declared as int arr[4][3];What is the total memory size allocated by this array and maximum
how many elements can be stored in this array? If the base address is 2000, compute the address of arr[2][3].
[Size of an integer variable 4 bytes by a typical compiler].
3 + 3+ 4+5

7. i) Write a user friendly C program to search an element from a 1-D array using linear search technique.
ii) What is void pointer? Write a C function to add to values using pointer (call by address representation)?
iii) Write a user friendly C program to check whether a number is Armstrong number or not (for example 153 is an
Armstrong number since 153=13 +53+33 ).
5+(2+3)+5

8. i) Write a C program to print the sum of the following series:


S= 1/1! + 1/2! + 1/3! + 1/4! + .. .. . + 1/N! (Input N).
ii) Write a user friendly program in C to find & print the Sum of all the numbers divisible by 7 within a given
Range and the range will be taken by user.
iii) Write a user friendly C program to multiply two matrices A[m][n] and B[n][m] and display the resultant matrix.
Input should be given by the user.
5+5+5
PTO
9. i) Define a recursive function with suitable conditions?
ii) Write a user friendly program in C to calculate the GCD of three numbers using recursion.
iii) Write a user friendly program in C to find the sum and mean of all elements in a float array using pointers.
5+5+5

10. i) Define a structure called student that will describe


{student name,
roll number,
year,
marks}
Using student, declare an array student with n elements and write a program to read the information
about all the students and display them
ii) Calculate the total required memory of the structure student that you have created.
iii) Give an example of a ternary operator. Explain it with a suitable example.
iv) Describe operator precedence and associativity with examples.

7+2+(1+2)+3

11. i) Write a user friendly C program to check whether a given alphabet is vowel or not using switch case.
ii) Write a C program to print the following pattern
*
***
*****
*******
*********
iii) What is function prototype? What do you mean by actual argument and formal argument?

5+5+(2+3)

12. i) What is array? Write the different properties of an array?


ii) Write a user friendly C program to find the largest of an array with n integer elements using function.
iii) Write a user friendly C program to convert the uppercase letter to lower case and vice versa.
(2+3)+5+5

END
____________

You might also like