Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9256485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:57:13+00:00 2026-06-18T11:57:13+00:00

This is my first task using pointers… I’m need to create a function that

  • 0

This is my first task using pointers…
I’m need to create a function that finds out which of two numbers is bigger, and than replace both of them to have the bigger value and print them.

I’m getting an error in the prinf of the main() :

argument type ‘void’ is incomplete

My code is:

#include <stdio.h>
void larger_of(double * x, double * y);

int main()

{
    double num1 = 4.5;
    double num2 = 5.5;

    printf("the original two numbers is %.1lf and %.1lf\n", num1, num2);
    printf("now: %lf and %lf", larger_of(&num1, &num2));

}

void larger_of(double * x, double * y)

{
    if (* x > * y)
        * y = * x;
    else if
       (* x < * y)
        * x = * y;
    else
        printf("they are equale!!");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:57:14+00:00Added an answer on June 18, 2026 at 11:57 am

    larger_of is a function that returns nothing. You cannot print its return value.

    To print your numbers after a call to larger_of just do:

    larger_of(&num1, &num2);
    printf("now: %lf and %lf", num1, num2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to write program that create process using pipe() . My first task
Using Dozer to map two objects, I have: /** /* This first class uses
My task consists of two parts. First I have to create globbal char array
I would like to have this behavior in a task history stack: First task
Hiya I am very new to C#, infact this is basically my first task
I have a task in Python and i run this task for first time
i have two arrays like this first array Array ( [0228] => Array (
How to create in-app step by step instructions? Like this ( first boot android
#include <iostream> using namespace std; // This first class contains a vector and a
I'm using UISplitViewController for app on iPad. The first task was to show master

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.