Create a program in C/C++ for Shortest Job First (SJF) Scheduling for the following processes that are in ready queue at 0 timestamp
Process CPU Burst Time
P1 1
P2 4
P3 2
P4 10
P5 7
A function which takes two input parameters and return the largest
Find out the number of occurrence of vowels, characters and digits in the given statements
Input:
#$@aghte123
AqEtImU@123
xyz@12345
Output:
2 5 3
4 7 3
0 3 5
Design a c program the embed special characters as leading and trailing to the input string and display the output
Input:
Strnset
#
4
Output:
####set
Str####
Vishal is having a bunch of coins ranging from rupees 1 to 10. Help him to write program to find the sum and average of the coins that he is having using while loop.
What happens if the condition in a while loop is initially false? Explain and differentiate
between while and do while statement in ‘C’ language.
What is an expression? What are its components? Explain.
Write a program that accepts a letter grade as input and outputs the teacher’s remarks. Use
only switch, do not use any if’s. Example: If ‘A’or ‘a’, then “Excellent job!”. If ‘F’ or ‘f’, then “You
failed. Please study more next time”.
Write a program that takes as input a class score. Output the grade for the class based on the
following guideline:
Exactly 100 is A+
90and above is A
80 and above is B
70 and above is C
60 and above is D
Anything less than 60 is F
Anything more than 100 or less than 0 is invalid input.
Mr. Narayan understands that among the 10 items, the items that are referred by odd index are not available in market. Help Mr. Narayan to convert the price of all odd index item to zero (0).