Multiple choice question on c programming

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

  1. Create a function to print "88 is a great port number"
    • function name is yourName_PrintFunction
    • no input
    • no return type
    • print "88 is a great port number"
  2. create a function to print a float
    • function name is yourName_PrintFloat
    • input parameter is a float
    • no return type
    • print the float input parameter
  3. create a function to square a value
    • function name is yourName_SquareValue
    • input parameter is a int
    • return type is an int
    • you will multiply the input int with the input int (int X int) and return this value
  4. create a function to add two number together
    • function name is yourName_AddValues
    • input parameter is an int (pass by value)
    • input parameter is a pointer to a int (pass by reference)
    • add the value input parameter to the reference input parameter
  5. create a function to print the values of an array
    • function name is yourName_PrintArray
    • input parameter is an int array
    • input parameter is the size of the array
    • create a for loop or while loop to print each element of the array
  6. Main function
    • declare and initialize a float variable to have the value .88
      • name the float variable yourName_floatEightyEight
    • declare a int variable
      • name the int variable yourName_firstInt
    • declare an int variable
      • name the int variable yourName_secondInt
      • initialize yourName_secondInt to be 8
    • call the function yourName_PrintFunction
    • call the function yourName_PrintFloat
      • pass in the yourName_floatEightyEight variable
    • call the function yourName_SquareValue
      • pass in the value 88
      • save the return value to the variable yourName_firstInt
    • call the function yourName_addValues
      • the value input parameter will be yourName_firstInt
      • the reference input parameter will be yourName_secondInt (pointer)
    • declare and initialize a int array of int values from 0 - 10
      • name the int array yourName_intArray
    • call the function yourName_PrintArray
      • pass in the yourName_intArray
      • pass in the size of the array
  7. Move the function yourName_PrintFunction into a separate file

 

 

Reference no: EM13161612

Questions Cloud

Create the class airplane : Your missions is to create the class Airplane. Each Airplane object should store the following information (fields):
How the differences in chromosome between chimps and humans : What can you say about the relationship between chimp and human chromosomes? Explain how the differences in chromosome number between chimps and humans represented an opportunity to test a prediction of common ancestry?
Depict the lewis structure of tartaric and malic acids : Draw the Lewis structure of tartaric and malic acids in a way that shows the geometry of the acid functional groups. Indicate the hybridization of each carbon
What is the marginal opportunity cost : Given the above prices, will the firm adopt a new method which involves 10 units of land, 3 of labor, 2 of capital, and 2 of entrepreneurial ability?
Multiple choice question on c programming : Create a function to print "88 is a great port number" function name is yourName_PrintFunction no input no return type print "88 is a great port number"
Draw a bidirectional replication fork : Draw a bidirectional replication fork and label the origin of replication, the leading strands, lagging strands, and the 5' and 3' ends of all strands shown in your diagram.
What is the difference between covalent bonds : What is the difference between covalent bonds, hydrogen bonds, van der waals interactions and ionic bonds?
Multiplexor and demultiplexor? : statistical time division multiplexing with 24 stations inputting data at 9600 bps, and assuming that only 60 percent of those stations transmit at one time, what is the minimal speed necessary for the high speed link connecting multiplexor and demul..
Each salesperson passes : Thus, each salesperson passes between 0 and 5 slips per day. Assume that the information from all of the slips from last month are available. Write an app that will read all the information for last months sales and summarize the total sales by sales..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a very basic doubly-linked list

CptS 122 Lab #2: Linked Lists ,  Along with vectors, linked lists are one of the fundamental data structures in computer science. Unlike vectors, which store information in a contiguous block of computer memory, linked lists have the potential to sto..

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

  Functions to compute stress and strain in steel rod

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads P of 10,000 to 1,000,000 pounds.

  Write program which prompts user to enter numbers

Write down the program which prompts the user to enter numbers, findsout how many positive and negative values have been entered, and calculates sum and average of numbers entered.

  Compute a program that calculates three resistance inputs

C language, compute a program that calculates three RESISTANCE inputs, and gives you the total resistance in OHMS. Like this, the total resistance is _____ ohms. These are three parallel circuits so the formula would be (1/R1 + 1/ R 2 +  1/ R 3 )  -1

  Make a game in which you guess a number

Make a game in which you guess a number between two set numbers to find the answer, the game should tell you if you are too low in your guess or too high. For example

  Implementation of data member counter of type int

Write the implementation (.cpp file) of Counter class. Here is the full specification of the class: A data member counter of type int.

  Prepare an accounting for a dorm''s kitchen

The "purpose" of the program is to prepare an accounting (database) for e.g. a dorm's kitchen, to keep track of the consumption of beer for each room.

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

  Programs written with inheritance

Many programs written with inheritance could be written with composition instead, and vice versa. Rewrite the classes Point3D, Sphere and Cylinder using composition rather than inheritance

  Programmingto compute the volume of water in the cubic feet

Write down an algorithm (Programming in C) in order to compute the volume of water in the cubic feet, flowing through a pipe of diameter d in feet, having a velocity of v feet per second.

  A series of one-digit non-negative numbers

Write a program that asks the user to enter a series of one-digit non-negative numbers

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