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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:15:42+00:00 2026-06-05T17:15:42+00:00

I am new to C and writing a simple program to display the byte

  • 0

I am new to C and writing a simple program to display the byte representation of data. When I compile, the Command Prompt screen flashes for 1/2 a second and disappears. In simpler words, the output doesn’t show up. Following is my code:

#include <stdio.h>
typdef unsigned char* pointer;

void show_int(int);
void show_bytes(pointer, int);
int main()
{
show_int(100);
}

void show_int(int x)
{
show_bytes((ponter) &x, sizeof(int));
}

void show_bytes(pointer start, int len)
{ 
  int i;
  for(i=0;i<len;i++)
  {
    printf("0x%p\t0x%.2x\n", start + i, start[i]);
  }
}
  • 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-05T17:15:45+00:00Added an answer on June 5, 2026 at 5:15 pm

    The program likely is displaying your output, then quickly exiting. You’ll want to delay before exiting. If you’re on Windows, use Sleep(milliseconds); if you’re on Unix, use sleep(seconds). Note not only the different units, but the different capitalization.

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

Sidebar

Related Questions

I am new to GWT. I am writing a simple GWT program where I
I am new to GWT. I am writing a simple GWT program where I
Im new to python programming.Im writing a simple command line based twitter app,and i
I'm new to StackOverflow and I had a simple question. I'm writing a program
I'm writing a simple Knight's Tour program with a graphical display. I've already written
I am new to lisp and am writing a few simple programs to get
I'm new to android and am writing a simple app that calculates the distance
I'm new to linq and having trouble writing two simple queries. For some reason,
I'm new to JavaFX and I'm writing a simple login application that I would
I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book

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.