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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:38:23+00:00 2026-05-26T02:38:23+00:00

I am creating a menu that needs to take in an three inputs from

  • 0

I am creating a menu that needs to take in an three inputs from the users.

    char *fullname;
    char *date;
    float sal;
    printf("\nEnter full name: ");

line92

scanf("%s", &fullname);
printf("\nEnter hire date: ");

Line 94

scanf("%s", &date);
printf("\nEnter salary: ");

Line 96

scanf("%d", &sal);

These are the errors I am recieving

Employee.c:92: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char **’
Employee.c:94: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char **’
Employee.c:96: warning: format ‘%d’ expects type ‘int *’, but argument 2 has type ‘float *’

Can I get an explanation of what is causing these issues?

  • 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-26T02:38:24+00:00Added an answer on May 26, 2026 at 2:38 am

    There are several problems:

    First:

    When you use scanf for strings you do not use the &. So just scanf("%s", fullname);.

    Second:

    Your pointers aren’t initialized. Try this instead:

    char fullname[256];
    char date[256];
    

    This will work as long as you input at most 255 characters.

    Third:

    Your typing for the last scanf doesn’t match. You’re passing in a float when you’ve specified an int in the format string. Try this:

    scanf("%f", &sal);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello all I am creating a horizontal menu for a site that needs to
I'm creating a custom control in wxWidgets that displays a menu as part of
I'm attempting at creating a menu from a table using the Suckerfish css menu
Im creating a dynamic MenuBar from xml file, and binding events to menu items
I'm creating a standard menu in my WPF application. I know that I can
I am creating a menu that will have its menu items injected into it
Need some advice on creating a floating menu that behaves very similar to what
I have an app planned out that needs to have a custom menu throughout
I need to hide the Home link that's generated from Wordpress main menu on
I am creating a menu and assigning images to menu items, sometime first item

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.