What is wrong with this function

Assignment Help C/C++ Programming
Reference no: EM13703786

What is wrong with this function? Can you find problem in this code?

void calcSum(int a, int b)

{

return a+b;

}

a. it is declared as void but returns an int.

b. Only a single variable can be returned.

c. "calcSum" is a reserved word.

d. Only the data type should be declared in the parameter list

Reference no: EM13703786

Questions Cloud

Determining the volume of the unit sphere : Write a C program for determining the volume of the unit sphere by the Monte Carlo Method      \(x^{2}+ y^{2} + z^{2} 0, y > 0, z > 0.\)    : This is what I have so far, but it's not working.
How will cyber security influence the next 10 years : How will cyber security influence the next 10 years?
Prepare a main function : Write a function that converts an input of some integer number of nickels into outputs of integer numbers of dollars, quarters, and nickels.
Canonical product of sums : Design a majority circuit. This is a circuit which produces a 1 anytime there are more 1's than 0's on the inputs. Your circuit should have 3 inputs.
What is wrong with this function : What is wrong with this function? Can you find problem in this code?
What is the value of beta : What is the value of beta after the subsequent code executes if the input is 1?
Write a simple program that uses the class : Write a simple program that uses the class. It should prompt the user to input a string, display it, call one or the other of the class functions to convert it, then display the converted string.
Write a function which takes a c string : Write a function which takes a C string as an input and counts the number of non-alphabetic characters in the C string. Non-alphabetic characters include anything outside the ranges 'a' thru 'z' and 'A' thru 'Z'.
Find database management system selection : Identify and describe three criteria that should be used to evaluate the selection of a database management system.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that converts between app and ppm values

Write a simple program that converts between APP and PPM values

  Part asuggest an application system which is able to

part asuggest an application system which is able to perform some arithmetic computations like commission system

  Conditional jump statements causes a jump to dest

Determine whether each of the conditional jump statements causes a jump to dest.

  What will be the value of xafter executing the above switch

If x = 3, then what will be the value of xafter executing the above switch statement?

  Write code in a client program

prompt use to enter a name and read it from the standard input device.

  Write a c++ program to calculate the gpa of 5 courses

Write a C++ program to calculate the Gpa of 5 courses. When users enter the grades and credits of the courses from the keyboard

  Create a constructor that initializes the data

After the user answers the question, just put the actual answer down below the one entered. You do not need to check if they were correct.

  Implement a second-order low-pass filter

Implement a second-order low-pass filter using the finite difference method. The finite difference method is a useful mathematical method that is used to numerically solve differential equations.

  Dimensional array of integers and fill it with data

Create a 2-by-3 two-dimensional array of integers and fill it with data. Loop through the array and locate the smallest value stored. Print out the smallest value as well as its row and column position in the array

  Implementnbsp the lsquoguess the word game in an

implementnbsp the lsquoguess the word game in an object-oriented manner. this program would add some basic manipulation

  Variables - features of good program design

Explain one reason why the variable name in question is acceptable but not recommended, and provide an alternative name that would both satisfy the compiler and be recommended according to variable naming conventions.

  Write a program that allows a user to enter 12 double values

Write a program that allows a user to enter 12 double values representing store sales for each month of one year. After all 12 values are entered,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd