






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Section A: Basic Programs: Question A1: WAP to input roll number, name, marks and phone of a student and display the values. Question A2: WAP to input roll number, name and marks of a student in 5 subjects and calculate the total and average marks. Display all the values. Question A3:WAP to find out the square of a given no. Question A4: WAP to input a no. and print its cube. Question A5: WAP to input radius and calculate the area and circumference of a circle. Question A6: WAP to input length and breadth of a rectangle and calculate the area and perimeter. Question A7: WAP to input 4 integers a, b, c, d and check that the equation a3 + b3 +c3 = d3 is satisfied or not. Question A8: WAP to input side of a square and calculate the area. Question A9: WAP to input principle, rate and time from the user and calculate the simple interest and total amount. Display all the values. Question A10: WAP to input the number the days from the user and convert it into years, weeks and days. Question A11: WAP to input a character and print its ASCII value. Question A12: WAP to input a number and print its equivalent character code. Question A13: WAP to input two numbers and print the greatest using conditional operator. Question A14: WAP to input marks of a student and print the result (pass/fail) using conditional operator. Question A15: WAP to input inches from the user and convert it into yards, feet and inches. Question A16: WAP to find out the area of a triangle. Question A17: WAP to find whether a given number is even or odd using conditional operator.
Question A18: WAP to find out the greatest of three numbers using conditional operator. Question A19: WAP to input choice (1 or 2). If choice is 1 print the area of a circle otherwise print the circumference of circle. Input the radius from user. Question A20: WAP to input a number. If the number is even, print its square otherwise print its cube. Question A21: WAP to input employee code, name and basic salary of an employee and calculate the following values: HRA 40 % of basic salary DA 10 % of basic salary CCA 5 % of basic salary GS Basic + HRA + DA + CCA PF 10 % of GS IT 10 % of GS NS GS – (PF + IT) Display all the values. Question A22: WAP to input the temperature in Fahrenheit and convert it into Celsius and vice versa. Question A23: WAP to swap the values of two integer variables. Section B: Programs Based on Control Structures Question B1: WAP to input the marks of a student and print the result (passing marks = 40 %). Question B2: WAP to input the age of a person and check that he is eligible for license for not. Question B3: WAP to check that a given year is a leap year or not. Question B3: WAP to input a number and check whether it is even or odd. Question B4: WAP to input a number and check that number is divisible by 7 or not. Question B5: WAP to input the name and age of a person and display “CHILD” or “TEENAGER” according to the age.
Question B10: WAP to find out the largest of three numbers. Question B11: WAP to input a digit and print the digit in words. Question B12: WAP to input two numbers and a choice and calculate the result according to the following conditions: Choice Result 1 Add 2 Subtract 3 Multiply 4 Divide 5 Remainder
Question B13: WAP to calculate the area of a circle, a rectangle or a triangle depending upon user’s choice. Choice Area 1 Circle 2 Rectangle 3 Triangle Question B14: WAP to input the marks in theory and practical and print the result. Question B15: WAP to print counting from 1 to 10. Question B16: WAP to print counting from 10 to 1. Question B17: WAP to print counting from 51to 90 Question B18: WAP to print all the even numbers between 1 and 50. Question B19: WAP to print all the odd numbers between 1 and 50. QuestionB20: WAP to print the sum and average of first n natural numbers. Question B21: WAP to print the sum and average of first n odd numbers. Question B22: WAP to print the sum and average of first n even numbers. Question B23: WAP to print the table of a given number.
Question B35: WAP to check number is Armstrong number or not. Question B36: WAP to input a number and print its reverse number. Also check that the number is palindrome or not. Question B37: WAP to input a number and find out the sum of its digits. Question B38: WAP to find out the count of the digits of a given integer. Question B39: WAP to print the Fibonacci series.
Question B40: WAP to print the following patterns.
**
1 12 123 1234 12345 A AB ABC ABCD Question B41: WAP to find the factorial of a number. Section C: Programs Based on Strings Question C1: W A P i n C t o c o u n t t h e n u m b e r o f c h a r a c t e r s i n a s e n t e n c e. Question C2: WAP in C to find the length of the string without using strlen() function. Question C3: WAP in C to implement gets() and puts() functions. Question C4: WAP in C to reverse a string without using string library function strrev(). Question C5: WAP to count the numbers of vowels, consonants, digits and special symbols in a given string. Question C6: WAP to count the lower case and upper case letters in a string. Question C7: WAP in C to Search occurrence of Character in String Question C8: WAP to search a given string into another string and displays the position if found otherwise displays 0. Question C9: WAP to extract specified number of characters from a given
Question E2: WAP to find out the sum of two matrices. Question E3: WAP to find the difference of two matrices. Question E4: WAP to find out multiplication of two matrices. Question E5: WAP to find out the transpose of a matrice. Section F: Programs based on Functions: Question F1: Write a function that takes one integer argument and returns its square. QuestionF2: Write a function to calculate the cube of a number. Question F3: Write a function to calculate the area of a circle where radius is passed to the function as argument. Question F4: Write a function to calculate the area of a rectangle where length and breadth are passed to the function as argument. Question F5: Write a function that has three arguments principle, rate and time and returns the simple interest. Question F6: Write a function to swap the values of two integer variables. Question F7: Write a function to swap the values of two integer variables Without using extra variable. Question F8: WAP to add two numbers using function. Question F9: WAP to find the maximum element in an array by passing array to a function.
Section G: Programs based on structures , union and pointers: Question G1: Write a function to swap the values of two integer variables. The addresses of the variables should be passed to the function as argument. Question G2: Create a structure Student. Store student name,roll number and marks of a student and display all the information. Question G3: Create a structure Student. Store student name,roll number and marks of 5 students and display all the information. Question G4: Create a structure book Store the information of a book : bookId,bookName and price of a book and display all the information. Question G5: Create a union Student. Store student name,roll number and marks of a student and display all the information. Question G6: WAP in C to display the value of a variable uing pointer. Question G7: Program to demonstrate example of array of pointers. Question G8: WAP in C to demonstrate pointer to an array. Question G9: WAP in C to demonstrate structure pointer. Question G10: WAP in C to demonstrate function pointer.