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

  • SEARCH
  • Home
  • 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 6335003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:46:12+00:00 2026-05-24T18:46:12+00:00

/tmp/ccjiJKv2.o: In function func’: b.c:(.text+0x16b): undefined reference to sqrt’ collect2: ld returned 1 exit

  • 0

/tmp/ccjiJKv2.o: In function func':
b.c:(.text+0x16b): undefined reference to
sqrt’
collect2: ld returned 1 exit status

Here is the code and I am using gcc compiler..

/*Write a function that receive 5 integers and returns the sum,average and standard deviation of these numbers*/

/*Author:Udit Gupta     Date:10/08/2011*/

#include<stdio.h>
#include<math.h>

void func (int *,float *,float *);

int main () {

        float avg,std_dev;

        int sum;

        func (&sum,&avg,&std_dev);      /*Passing address of variables where output will be stored.....*/

        printf ("The sum of numbers is %d\n",sum);
        printf ("The average of numbers is %f\n",avg);
        printf ("The standard deviation of numbers is %f\n",std_dev);

}


void func (int *sum_, float *avg_ , float * std_dev_) {

        int n1,n2,n3,n4,n5;

        printf("Please enter the number:");
                scanf("%d%d%d%d%d",&n1,&n2,&n3,&n4,&n5);


        /*Formula for sum,average and standard deviation*/

        *sum_ = n1+n2+n3+n4+n5;                 /*Writing output at the address specified by arguments of function*/
        *avg_ = *sum_ / 5 ;
        *std_dev_ = sqrt ( pow((n1-*avg_),2)+pow((n2-*avg_),2)+pow ((n3-*avg_),2)+pow ((n4-*avg_),2)+pow ((n5-*avg_),2)/4) ;

}
  • 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-05-24T18:46:12+00:00Added an answer on May 24, 2026 at 6:46 pm
    #include <math.h> - is this what you need?
    

    Also, Link with -lm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gcc -lGL -lGLU -lglut light.c /tmp/ccfuthSi.o: In function `init': light.c:(.text+0x72): undefined reference to `glClearColor'
g++ simple_wget.cpp -lssl -lboost_system -lpthread -lcrypto -lboost_filesystem /tmp/cc2jNHvk.o: In function `__static_initialization_and_destruction_0(int, int)': simple_wget.cpp:(.text+0x5eb): undefined
On running: vim /tmp/blah :q echo $? I get an exit status of 1
function grabSourceFile { cd /tmp/lmpsource wget $1 > $LOG baseName=$(basename $1) tar -xvf $baseName
var tmp = ; function putItem() { this.innerHTML = <img src = 'image/+tmp+.png'>; }
/tmp/ccTQFVCP.o: In function `whiteSpace': /home/tommo/fly/flyc/config.c:12: multiple definition of `whiteSpace' /tmp/cc0ccMfz.o:/home/tommo/fly/flyc/config.c:12: first defined here /tmp/ccTQFVCP.o:
tmp-file contains: database_1 database_2 database_3 I want to run a command like mysqldump DATABASE
In c# double tmp = 3.0 * 0.05; tmp = 0.15000000000000002 This has to
int main(void) { char tmp, arr[100]; int i, k; printf(Enter a string: ); scanf_s(%s,
I periodically remove the tmp out of session files. Apparently, I mismanage sessions because

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.