Diploma In CS

PYQ – PROGRAMMING WITH "C" (2418101) | SEMESTER 1ST AND 2ND (1ST YEAR) | Year 2025

Share:WhatsAppTelegramTwitter
PROGRAMMING WITH "C" (2418101) – Years
Question 1

Programming with "C" 2025 (NEW) PYQ.

PWC2025PYQ


Group A

Choose the most suitable answer from the following options: -   (1*20=20)


(i) Match the following symbol name with their function:

(a) Oval                        i. Decision making

(b) Diamond                 ii. Represents start and end of the flowchart  


(ii) Match the following:

(a) 5 % 2 == 1               i. FALSE

(b)  4 % 2 > 0                ii. TRUE


(iii) In C programming, header files are used to defined the implementation of functions.

(a) TRUE 

(b)  FALSE 


(iv) A variable of string data type to store name can be declared as following:

int name;

(a) TRUE         

(b) FALSE 


(v) In C programming, the (a) ____________ statement allows you to execute a block of code only if a specified conditions is true. If the condition is false the (b) ___________ statement to execute an alternative block of code.

(a) if

(b)  else


(vi) In C programming, a two-dimensional array can be declared using the syntax data_type array_name [(a) ___________] [(b) __________ ]

(a) rows

(b) columns 


(vii) Structures are used to group related variables together.

(a) False

(b) True


(viii) Select the odd one out from the following typedef declarations

(a) typedef int Integer;

(b) typedef char * String ;

(c) typedef float coordinate [2];


(ix) Determine the output of the following C code snippet

int arr [3] = {10,20,30};

int *p = arr;

printf (“%d\n”,*(p+1))

(a) 10

(b) 20

(c) 30 

 
(x) Match the following

Pointer type                  Representation

(a) Array Pointer           i. int *ptr;         

(b) Integer Pointer         ii. Char *ptr = &array_name;

 

Group:-"B"

Answer all Five Questions: -                         (5*4=20) 

 

2. Write an algorithm for finding if a number is even.

OR

Draw a flow chart to find greatest from two numbers.

 

3. Discuss about the keywords of C programming.

OR

Discuss about printf() and scanf() function.

 

4. Write a C program fir explaining working of while loop.

OR

 Write a C program to explain if-else ladder.

 

5. Explain recursive function.

OR

 Explain the following string handling function:

a.      strcat ()

b.      strlen ()

 

6. Demonstrate accessing elements of an array using a pointer.

OR

 Write the syntax to declare pointer to function in C.

 

Group:- "C"

Answer all Five Questions: -                         (5*6=30)

 

7.  Discuss continue statement and explain it through an example.

OR

 Discuss goto statement through an example.

  

8. Illustrate the following relational operators:

       i.          ==

     ii.          !=

    iii.          <=

OR

Illustrate switch case statement through an example.

 

9. Explain declaration and initialization of 2-dimensional array.  

OR

  Write a pseudo code to reverse an array of character.

 

10. Write syntax for declaring a structure with 3 variables and discuss its size. 

OR

 Write a C program to find sum of all elements of an integer array.

 

11. Explain “call by value” with an example  

OR

  Write a recursive function to find factorial of number.

 

 


*****

 

Thank you for visiting us, Hope you like our content and its really helpful for you.

Do follow us for regular updates and if you want any specific help feel free to ask on below.

 

Web Site: https://diplomaincs.in/

 

Contact Us: https://diplomaincs.in/contact-us

 

Follow us on below social handle:-


LinkedIn:
https://www.linkedin.com/in/computer-scinece-and-engineering-diploma-b5917b3a1/

What’s App:
https://whatsapp.com/channel/0029VaGwTZU1t90j9c1bKl0g


Facebook:
https://www.facebook.com/Diploma.1234

Q1

PYQ Video References

No references available right now.

Comments & Reviews

Loading comments...