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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:20:51+00:00 2026-06-14T07:20:51+00:00

I found similar questions but I don’t think they applied to my specific problem,

  • 0

I found similar questions but I don’t think they applied to my specific problem, so I’m sorry if they do!

I’m learning C as a first year CS student and trying to make a quiz in C, but I can’t get anywhere because every time I try to compile to see if it’s working I get the message “warning: initialization makes pointer from integer without a cast.”

I’ve worked out all of the syntax errors (I think) but I just for the life of my can’t figure this out. I’ve gone through all of my lecture slides but none of them cover this.

#include <stdio.h>
#include <scc110.h>

int player1score, player2score;
char* answer1, answer11, answer111, answer2, answer22, answer222;

int geography()
{
  printf ("The first category is geography. Note: Player 1 always goes first.\n");

  char* answer1 = AskForStringAndWait("Player 1: What is the capital of India?");
  if (strcmp(answer1,"New Delhi")==0)
    player1score++;

  char* answer2 = AskForStringAndWait("Player 2: What is the capital of Iran?");
  if (strcmp(answer2,"Tehran")==0)
    player2score++;

  char* answer11 = AskForStringAndWait("Player 1: Name a country that borders France that  isn't Germany, Italy or Spain.");
  if (strcmp(answer11,"Luzembourgh")==0 ||
      strcmp(answer11,"Switzerland")==0 ||
      strcmp(answer11,"Belgium")==0)
    player1score++;

  char* answer22 = AskForStringAndWait("Player 2: Name one of the main British Channel Islands.");
  if (strcmp(answer22,"Guernsey")==0 ||
      strcmp(answer22,"Jersey")==0)
    player2score++;
}
  • 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-14T07:20:52+00:00Added an answer on June 14, 2026 at 7:20 am

    You forgot to declare AskForStringAndWait function.

    In modern C (past-C99) that would be an error, since C99 does not allow calling undeclared functions.

    In C89/90 it is not an error. When an undeclared function is called, it is assumed that it returns an int value. So, your

    char* answer1 = AskForStringAndWait("Player 1: What is the capital of India?");
    

    is interpreted as an attempt to initialize a char * pointer with an int value. Hence the warning.

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

Sidebar

Related Questions

I found similar questions while searching for a solution for my problem but I
I've tried searching for similar questions here and I don't think I've found anything
I know this looks similar to other questions here but I don't think my
I found similar questions but no answer to what I am looking for. So
I ran a quick google and SO search and found similar questions but none
I know there are several threads asking similar questions - but I havent found
I've looked at similar questions here but I haven't found one particular to my
I've found some similar questions on StackOverflow, but nothing that addresses what I'm looking
I found a couple questions similar to this, but not specifically for .NET projects,
I found a few questions similar to this one here on SO, but none

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.