Thread: please help me solve

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    1

    Post please help me solve

    Good day everyone.

    Can someone help me on how to solve the follow questions on c++ programming

    1. Write a function that accepts an array of non-negative integers and returns the second largest integer in the array. Return -1 if there is no second largest.

    2. Write a function that takes an array of integers as an argument and returns a value based on the sums of the even and odd numbers in the array. Let X = the sum of the odd numbers in the array and let Y = the sum of the even numbers. The function should return X - Y

    3. Write a function that accepts a character array, a zero-based start position and a length. It should return a character array containing containing length characters starting with the startcharacter of the input array. The function should do error checking on the start position and the length and return null if the either value is not legal.

    Thanks i appreciate in advance

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Read the homework policy first.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. solve
    By rahulietlko in forum C Programming
    Replies: 1
    Last Post: 10-09-2010, 01:46 PM
  2. Can anybody let me know how to solve this.
    By Farhan in forum C Programming
    Replies: 5
    Last Post: 02-24-2009, 08:44 PM
  3. How to solve this?
    By fenikkusu in forum C Programming
    Replies: 16
    Last Post: 01-09-2009, 04:15 AM
  4. how to solve this bug??
    By transgalactic2 in forum C Programming
    Replies: 31
    Last Post: 10-07-2008, 10:26 PM
  5. can u solve it?
    By brad123 in forum C Programming
    Replies: 17
    Last Post: 04-29-2002, 12:48 PM