The supermarket has different variety of items in different weight. Find maximum weight from these items. Write a program to find maximum weight of an item using dynamic memory allocation.
Runtime Input :
10
2.34
3.43
6.78
2.45
7.64
9.05
5.67
34.95
4.5
3.54
Output :
34.95
Write a program using a 1D array to evaluate the following expressions:
Total = ∑ (Xi)^2
where summation is from i=1 to 10.
Write a program using a 1D array to evaluate the following expressions: Total = ∑ (Xi) 2 where summation is from i=1 to 10.
Write a function isPalindrom() that takes as input a C string and its size, and recursively tests whether it is a palindrome (a word or phrase which remains the same if reversed. e.g. radar, kayak etc). The function returns the Boolean data type which is either true or false. The required header “stdbool.h” has already been included in tasks.h.
The function has the following prototype:
bool isPalindrom(char * ptr_array, int size);
The recursive definition of a palindrome is:
• The string is a palindrome if it has only one character or is an empty string.
• The string is a palindrome if the first and the last characters are the same and the characters in between form a palindrome.
Write a program to swap two numbers using temporary variables and functions (call by value).
Runtime Input :
12
5
Output :
5
12
In online journal system, the user has to give detail information about their abstract of the manual script before upload of source document. The abstract submitted by the author should not more than 300 words. The journal system uses program to count the number of vowels, consonants, digits and symbols in a given paragraph. Write a program to count the number of vowels, consonants, digits and symbols using pointers as reference to the function.
write the function to find of the string which is passed from main program using pointers
Runtime Input :
hello
Output :
5
Write a menu driven program that depicts the working of a library. The menu options should be: 1. Add book information 2. Display book information 3. List all books of given author 4. List the title of specified book 5. List the count of books in the library 6. List the books in the order of accession number 7. Exit Create a structure called library to hold accession number, title of the book, author name, price of the book, and flag indicating whether book is issued or not.
Write a menu driven program that depicts the working of a library. The menu options
should be:
1. Add book information
2. Display book information
3. List all books of given author
4. List the title of specified book
5. List the count of books in the library
6. List the books in the order of accession number
7. Exit
Create a structure called library to hold accession number, title of the book, author
name, price of the book, and flag indicating whether book is issued or not.
Write a C Program that does the following:
1. Declares a C-String called ‘m1’ and initializes it with the text “Programming is great fun!”.
2. Uses C-function puts() to print this string.
3. Asks the user to enter a string named ‘m2’ (Hint: Use gets() function for this.)
4. Concatenates the two strings and stores the result in ‘m3’.
For example, if the user enters m2 as “Not Really!”, m3 should be “Programming is great fun! Not really!”
5. Inserts the user entered array (m2) into m1 after “Programming is ...”
For the above example, the resultant String would become “Programming is Not really! great fun!”