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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:52:54+00:00 2026-05-24T10:52:54+00:00

i am trying to run a very simple C program using XCode which is

  • 0

i am trying to run a very simple C program using XCode which is typed below

1)   #include <stdio.h>
2)   int main ()
3)   {
4)     printf("Hello, World!\n");
5)     func();
6)     return 0;
7)   }
8)   void func()
9)   {
10)    printf("xxxx");
11)  }

In line number 5 i am getting warning “Implicit declaration of func is invalid in c99” and in line number 8 i am getting an error “conflicting types for func”

please advise
Thanks,

  • 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-24T10:52:54+00:00Added an answer on May 24, 2026 at 10:52 am

    You need to declare func(); before using it (in main), otherwise it is declared as a function that returns int, and when the compiler gets to line 8, it sees a different declaration of the same function that returns void.

    #include <stdio.h>
    void func(void);
    int main ()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just trying to compile and run a very simple test program, but
I am trying to build a very simple C++ program using the Maven NAR
I have a very odd issue trying to run this quite simple C program
I'm trying to write very simple program which will imitate simple DeadLock, where Thread
I am trying run a program from a qmake .pro file which modifies the
I am trying to run a very simple server/client ssl code with a self
I give up now on this very simple test I've been trying to run.
Rails: 3.0.3 Ruby: 1.9.2 Trying to deserialize a very simple object using YAML.load or
I am trying to write a VERY simple UI in Python using Tkinter. I
I'm trying to program a simple search in google via C# that would run

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.