Creates an array of integers dynamically

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

Please help ASAP!!! Thank you so much!

1. Write a C program that inputs your first name, last name and U number as strings. Shown a menu with 3 different options to either
print your first name, your last name, or your U#. Use a function for each option.

2. Write a C program that creates an Array of integers dynamically (using malloc). You need to ask the user the size of the array. Define a function and pass the array to the function. Inside the function multiply each value by 2 and print them.

3. What is wrong or missing in this code to avoid errors or warnings?

#include <stdio.h>

int main()
{
int x;

printf( "Please input two numbers to be multiplied: " );
scanf( "%d", &x );
printf( "The product of your two numbers is %d\n", mult( x, y ) );
getchar();
}
int mult (int a, int b)
{
return a * b;
}

4. What is wrong or missing in this code to avoid errors or warnings?
#include <stdio.h>
int main( )
{
int p;
int val[7] = { 11, 22, 33, 44, 55, 66, 77 } ;

p = val[0];
for ( int i = 0 ; i <= 6 ; i++ )
{
printf("val[%d]: value is %d and address is %u", i, *p, p);
p++;
}
return 0;
}

Reference no: EM132095869

Questions Cloud

Write a main program to call the function : Write a main program to call the function using an integer of your choice and print the contents.
What is the ending inventory using the average cost method : Sales for the year totaled 270 units, leaving 10 units on hand at the end of the year. What is the ending inventory using the average cost method (rounded)
What is the saving in the average time to retrieve a webpage : The time for A to obtain the remaining web object after the reception of the HTML file, assuming all the web objects are cached at the proxy.
Prepare journal entries for first interest payment on june : Woodwick Company issues 6%, five-year bonds, on December 31, 2014, Prepare journal entries for first interest payment on June
Creates an array of integers dynamically : Write a C program that creates an Array of integers dynamically (using malloc). You need to ask the user the size of the array.
Defining characteristics of companies : Fortune magazine and hay group found that a clear, stable strategy is one of the defining characteristics of companies on the list
Simulate the transmission and reception of a text message : The purpose of this assignment is to simulate the transmission and reception of a text message over a noisy communications channel.
Representations of business data flow and processes : Assignment - Literature Bonanza - Select appropriate IT solutions for business functions - Apply business information software for data visualization
Prepare january journal entry to record the bond issuance : Legacy issues $710,000 of 8.0%, four year bonds dated January 1, 2015, Prepare the January 1, 2015, journal entry to record the bond's issuance

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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