Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Given a linked list containing n nodes. The problem is to insert a new node


with data x at the middle of the list. If n is even, then insert the new node


after the (n/2)th node, else insert the new node after the (n+1)/2th node

Suppose we have a pointer to float data type which contains the memory address

value 100.

If we add the integer value 3 to this pointer, what will be the value of the pointer if float data

types are 4 bytes in length?


Read about doing multiplication using Karatsuba method

Write a C++ program which:

• Prompts user to enter two large integer numbers (x, y).

• Make a function called Karatsuba() which takes these two integers and returns the

multiplication result using Karatsuba algorithm.

o Your function should do parameter validation. Both numbers must be more

than 4 digits and less than 10 digits (don’t use strings). If parameters are not

valid then the function should return 0;

o The entered numbers could be negative or positive. For example: 820778 and

-58712979 where x is 6-digit positive number and y is 8-digit negative

number.


• You might need to make another helper function called getDigits() which will get an

integer as input and returns number of digits of that integer. getDigits() will help you

find the value of m and Bm.

• Finally, display result in the main function


Write a C++ program that takes up to 10-digit integer input from user (can be 1 digit, 2 digit, and so on..); passes this to a function which reverses the digits. Finally, the reversed number should be displayed in the main function. For example: when user enters 10-digit like 1234567890 your function will reverse it to 987654321. Do not use strings. Be careful for big integer values. [use functions, decision control]


A number is called a happy number, if you start with the given number

and arrive at 1 by repeating the following process (as illustrated in the below example):

(a) compute the sum of the squares of given number digits

(b) if the resultant value is 1, then the number is happy number, else execute point (a) for

the newly produced number.

Note that if a number is not a happy number, there will be an endless loop to this execution.

Goal: In this question, you are required to write a recursive function that checks whether

the number entered by the user is a happy number or not for 10 cycles/iterations only. The

output shown in blue colour should be shown by the function and text in yellow colour

should be displayed by the main function.


a. Write a function convert() that converts a decimal number to a binary, octal, and

hexadecimal equivalents. The function will take two arguments: first argument will be

the number to be converted and second argument will be the base in which this number

is to be converted. Function should return the converted value. You may use strings to

represent converted numbers like “0x3A”, “00101100”, “72” etc. Lower limit must be smaller than upper limit.

b. Call convert() function in the main program to produce the following output.

Example output:

Enter upper limit = 20

Enter lower limit = 10

Decimal Binary Octal Hexadecimal

10 00001010 12 0xA

11 00001011 13 0xB

12 00001100 14 oxC

13 00001101 15 0xD

14 00001110 16 0xE

15 00001111 17 0xF

16 00010000 20 0x10

17 00010001 21 0x11

18 00010010 22 0x12

19 00010011 23 0x13

20 00010100 24 0x14


Given a linked list containing n nodes. The problem is to insert a new node



with data x at the middle of the list. If n is even, then insert the new node



after the (n/2)th node, else insert the new node after the (n+1)/2th node.

Write a program to take input for n number of employee records and write records of all employees in a file named: “record1”. Also write records of all those employees in another file named: “record2” who are taking salary more than 50,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of employee: emp_id, emp_name, emp_experience, emp_salary]


Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a function named IsVectorMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains all multiples of ten. Define a function named IsVectorNoMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains no multiples of ten.

Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. 

The program must define and call the following two functions. IsVectorMult10 returns true if all integers in the vector are multiples of 10 and false otherwise. IsVectorNoMult10 returns true if no integers in the vector are multiples of 10 and false otherwise.

bool IsVectorMult10(vector<int> myVec)

bool IsVectorNoMult10(vector<int> myVec)



Is software engineering applicable when Web Applications are built? If so, how might it be modified to accommodate the unique characteristics of Web Applications?

 

Question:

 

Most agile process models recommend face-to-face communication. Yet today, members of a software team and their customers may be geographically separated from one another. Do you think this implies that geographical separation is something to avoid? Can you think of ways to overcome this problem?



LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS