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 701895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:39:38+00:00 2026-05-14T03:39:38+00:00

My C code #include <stdio.h> #include <stdlib.h> #include help.h int test(int x, P *ut)

  • 0

My C code

#include <stdio.h>
#include <stdlib.h>
#include "help.h"

int test(int x, P *ut) {
    int point = 10;

    ut->dt[10].max_x = NULL;
}

int main(int argc, char** argv) {

    return (EXIT_SUCCESS);
}

my help.h file code

typedef struct{
    double max_x;
    double max_y;
}X;

typedef struct{
    X dt[10];
}P;

I got an error i.e

error: incompatible types in assignment

error comes in here

ut->dt[10].max_x = NULL;

can anybody help me.
thanks in advance.

  • 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-14T03:39:39+00:00Added an answer on May 14, 2026 at 3:39 am

    You are trying to set a double value to NULL, which even if compiles, is mixing two incompatible terms. (In some versions of the C class library NULL is defined simply as 0, in others as (void*)0 – in latter case you get an error for such code.)

    Moreover, you try to access index 10 of an array of size 10, which is out of bounds – the elements are indexed from 0 to 9. So try this:

    ut->dt[9].max_x = 0.0;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 513k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Note: First thing is to check with the owner of… May 16, 2026 at 5:46 pm
  • Editorial Team
    Editorial Team added an answer (end - start) / 1000000 1 microsecond = 1000 nanoseconds… May 16, 2026 at 5:46 pm
  • Editorial Team
    Editorial Team added an answer hmm... you could do this: $('.lblpricefrom > strong').each( function(){ if($(this).html()… May 16, 2026 at 5:46 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

i have following code #include <stdlib.h> #include <stdio.h> int sorter( const void *first_arg,const void*
The following code causes a SIGSEGV, but only while debugging. #include <stdio.h> #include <stdlib.h>
Why does the following code not work #include <iostream> #include <fstream> #include <stdio.h> #include
In the following code, I copy a string in to a char* str, which
I am trying to implement hash_multimap in C++. Here is the code: #include <hash_map>
further developing the code from yesterday ( seg fault caused by malloc and sscanf
I am using this code to extract a password protected RAR file. I am
Ok this is only my second question, and it's quite a doozy. It's for
i declare a global variable and use and modify its value in the function.
I'm doing a benchmark with two versions of a function to filter a linked

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.