Write a C program to calculate the salary of each employee in your company. You need to input the hours worked and the hourly rate. The company pays 1.5 times the hourly rate for all hours worked in excess of 48 hours. Use the formulas below to calculate the salary: if employee worked less than 48 hours salary = hours * rate; if employee worked more than 48 hours salary = 48.0 * rate + ( hours − 48.0 ) * rate * 1.5; You are required to use a loop to produce the sample output as given below.
1 13008You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above.
4 12228Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].
1 5762What is the output of the following 3D Array int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; what is the output for arr[2][1][0]?
6 42760what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
2301Post New C++ General Questions
What is c++ best used for?
What is ostream in c++?
What is the c++ code?
What is the advantage of an external iterator.
Explain the differences between private, public and protected and give examples.
What is the main use of c++?
What is rtti in c++?
What is insertion sorting?
How is data hiding achieved in c++?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
Write a program to read the data and evaluate the results of the election. Print all output to the screen. Your output should specify: The total number of votes, the number of valid votes and the number of spoilt votes. The winner(s) of the election. Hint: An appropriate search should be used to determine the winner(s). The votes obtained by each candidate sorted in terms of the number of votes obtained. Hint: An appropriate sort should be used to sort the candidate(s). The Source code should be saved as VotingSystem. Project Input: Candidates’ Names and Numbers 2501 Victor Taylor 2502 Denise Duncan 2503 Kamal Ramdhan 2504 Michael Ali 2505 Anisa Sawh 2506 Carol Khan 2507 Gary Owen Votes 3 1 2 5 4 3 5 3 5 3 2 8 1 6 7 7 3 5 6 9 3 4 7 1 2 4 5 5 1 4 0 Project Output: Invalid vote: 8 Invalid vote: 9 Number of voters: 30 Number of valid votes: 28 Number of spoilt votes: 2 The winner(s): 2503 Kamal Ramdhan 2505 Anisa Sawh Candidate Score 2503 Kamal Ramdhan 6 2505 Anisa Sawh 6 2501 Victor Taylor 4 2504 Michael Ali 4 2502 Denise Duncan 3 2507 Gary Owen 3 2506 Carol Khan 2
What is difference between malloc()/free() and new/delete?
What is the use of string in c++?
What is an adjust field format flag?
What is the fastest c++ compiler?