Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pls answer in C language Section 1 ( Strings ) 1. A string consists of a sentence. Write a program to replace a part of

image text in transcribed

Pls answer in C language

Section 1 ( Strings ) 1. A string consists of a sentence. Write a program to replace a part of the string with another part of the string Example: Input : Give String :Mary goes to Delhi. She is doing the M.Tech at our college Replaced String : has come from Position to replace: 5 to 11 (Start and end positions to replace) Output: Mary comes from Delhi. She is doing the M.Tech at our college 2. A paragraph consists of multiple lines. Write a program to count the number of articles in it. Input: C was invented by Dennis Ritchie. It is a middle level language. It has lot of operators. An operator is a symbol for performing an operation. There are various predefined functions. Some of them are : printf(), pow(), Sin(). Output: 4 3. Assume that there are two paragraphs. Write a program to count the number of lines, number of words and number of characters in each of it. Section 2( Sorting and Searching) 4. Execute insertion sort algorithm manually to sort the following numbers 55, 23, 45, 12, 67, 20, 34, 10, 54, 50, 19 5. Execute Selection sort algorithm manually to sort the following numbers 55, 23, 45, 12, 67, 20, 34, 10, 54, 50, 19 6. Assume that the following set of elements are given: 55, 23, 45, 12, 67, 20, 34, 10, 54, 50, 19 How do you search the elements 45, 50 and 18 with the Linear and Binary search methods Section 3 ( Loops and Conditions) 7. Write a program to display all the strong numbers between 100 to 999 A strong number is a number in which the sum of the factorial of the digits is equal to the number itself. (Example: 145 = 1! +4! +5!) 8. Write a program to display all the cyclic numbers between 1 to 99. A cyclic number is a number if its square ends with the number. Examples: 6 (62 = 36 ), 5 (52= 25 ) ,76 (762 = 5776 ) 9. Write a program to find the binary equivalent for a negative decimal number a = Section 4 (Pointers and Structures) 10. Assume that there are 'n' employee records. Each employee record consists of employee name, employee number, department, designation and salary. Write a program to sort the records according to department and salary. (Hint:- The records are to be sorted on the department and within each department, the records are to be sorted according to salary)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions