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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:19:04+00:00 2026-06-14T21:19:04+00:00

I am coding a record-keeping program in C using binary file handling. I am

  • 0

I am coding a record-keeping program in C using binary file handling. I am using Code::Blocks, with gcc to compile my C program on Windows 8.

When the program reaches to the following block, an error-message appears:

enter image description here

My code:

int dispaly(student record[], int count)
{

/*
This is what structure `student` looks like:

 int id;
    char name[200], phone[20], address[200], cclass[50];
    char sec[20], roll[50], guardian_name[200], relation[200] ;
    char p2_colg[100], slc_school[200];
    float plus2_percent, slc_percent;
    struct date dob;
    struct date enr_date;


    struct date looks like
       int day, month, year;
*/
printf("Reached"); /*Program Runs Fine upto here*/
int i = 0;
for(i=0; i<count; i++)
{
    printf("\nId: %d\tPhone: %s\nName: %s\nAddress: %s"
           "\nClass: %s\tSection: %s\nRoll: %s\nGuardian Name: %s\tRelation:%s"
           "\nPlus-Two in: %s\tPercentage:%f\nSLC School: %s\tPercentage: %f"
           "\nDate Of Birth(mm/dd/yyyy): %d/%d/%d"
           "\nEnrolled in (mm/dd/yyyy): %d/%d/%d\n\n---------------------------------------\n", record[i].id, record[i].name, record[i].address
           , record[i].cclass, record[i].sec, record[i].roll, record[i].guardian_name, record[i].relation, record[i].p2_colg
           , record[i].plus2_percent, record[i].slc_school, record[i].slc_percent, record[i].dob.month, record[i].dob.day, record[i].dob.year
           , record[i].enr_date.month, record[i].enr_date.day, record[i].enr_date.year);

}
getch();
return 0;
}

The program compiles without any errors or warnings.

What’s going on?

  • 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-14T21:19:05+00:00Added an answer on June 14, 2026 at 9:19 pm

    Hard to tell exactly what crashed without looking at the exact data in your array, but you forgot “phone” in the arguments list to printf, which could certainly result in a crash inside printf.

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

Sidebar

Related Questions

The coding like decimal prodprice = Convert.ToDecimal(NavigationContext.QueryString[Price]); then what should i put for Binary
When coding a tag file, how to instruct caller to skip rest of the
I'm coding a script that takes one csv file to transform it into another
I'm currently coding a button which will delete a record from a database if
I'm new to ruby and rails and I'm wanting to following coding standards and
I'm coding a site that's using tags. Two other classes (Foo and Bar) both
I am using visual basic as the coding language. conSQL.Open() Dim cmd As New
I'm coding using PHP PDO and MySQL. In that context, can I write a
I'm coding a quiz and record individual answers in a SQLite-Database. My table has
I just start coding in PHP, i wrote my first php + mysql program

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.