Sunidhi Bansal has Published 1100 Articles

C++ Program for Deadlock free condition in Operating Systems

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:50:06

3K+ Views

Given with the P number of processes in the memory and N number of needed resources by them to complete their execution and the task is to find the minimum number of resources R which should be allotted to the processes such that deadlock will never occur.What is a DeadlockDeadlock ... Read More

C program for Binomial Coefficients table

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:48:19

6K+ Views

Given with a positive integer value let’s say ‘val’ and the task is to print the value of binomial coefficient B(n, k) where, n and k be any value between 0 to val and hence display the result.What is Binomial CoefficientBinomial coefficient (n, k) is the order of choosing ‘k’ ... Read More

C Program for Circumference of a Parallelogram

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:45:53

96 Views

We are given with the sides of parallelogram and the task is to generate the circumference of a parallelogram with its given sides and display the resultWhat is a Parallelogram?Parallelogram is a type of quadratic which have −Opposite sides parallelOpposite angles equalPolygon diagonals bisects each otherShown in the below figure ... Read More

C++ Program for class interval arithmetic mean

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:44:06

448 Views

We are given with three arrays where first array contains the upper limit for arithmetic mean, second array contains the lower limit for arithmetic mean and third array contains the frequencies and the task is to generate the arithmetic mean of class intervals given.What is Arithmetic Mean?Arithmetic mean is the ... Read More

C++ Program for converting hours into minutes and seconds

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:23:37

1K+ Views

Given with the input as hours and the task is to convert the number of hours into minutes and seconds and display the corresponding resultFormula used for converting the hours into minutes and seconds is −1 hour = 60 minutes    Minutes = hours * 60 1 hour = 3600 ... Read More

C++ Program for triangular pattern (mirror image around 0)

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:23:06

238 Views

Given with the positive value n and the task is to generate the triangular pattern i.e. mirror image of the printed numbers and display the resultExampleInput-: n = 6 Output-:Input-: n = 3 Output-:Approach used in the below program is as follows −Input the value of n as a positive ... Read More

C++ program for Find sum of odd factors of a number

Sunidhi Bansal

Sunidhi Bansal

Updated on 09-Jul-2020 08:22:32

418 Views

Given with a positive integer and the task is to generate the odd factors of a number and finding out the sum of given odd factors.ExampleInput-: number = 20 Output-: sum of odd factors is: 6 Input-: number = 18 Output-: sum of odd factors is: 13So, result = 1 ... Read More

Program for n’th node from the end of a Linked List in C program

Sunidhi Bansal

Sunidhi Bansal

Updated on 04-Jul-2020 07:01:13

1K+ Views

Given with n nodes the task is to print the nth node from the end of a linked list. The program must not change the order of nodes in a list instead it should only print the nth node from the last of a linked list.ExampleInput -: 10 20 30 ... Read More

Print system time in C++ (3 different ways)

Sunidhi Bansal

Sunidhi Bansal

Updated on 02-Jul-2020 08:52:10

11K+ Views

There are different ways by which system day, date and time can be printed in Human Readable Form.First wayUsing time() − It is used to find the current calendar time and have arithmetic data type that store timelocaltime() − It is used to fill the structure with date and timeasctime() ... Read More

Print triplets with sum less than or equal to k in C Program

Sunidhi Bansal

Sunidhi Bansal

Updated on 01-Jul-2020 08:08:03

92 Views

Given array with set of elements and the task is to find out set with exactly three elements having sum less than or equals to k.Input − arr[]= {1, 2, 3, 8, 5, 4}Output − set → {1, 2, 3} {1, 2, 5} {1, 2, 4} {1, 3, 5} {1, 3, 4} ... Read More

Advertisements