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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:55:04+00:00 2026-05-27T04:55:04+00:00

I wrote a small c program to print an extended ASCII char corresponding to

  • 0

I wrote a small c program to print an extended ASCII char corresponding to value 129

#include<stdio.h>
int main(void)
{
  char a = 129;
  printf("%c\n",a);
  return(0);
}

compiled and run it on my unix machine (fedora 16) on bash terminal.
it gives wrong display. it shows a question mark in back with white oval background.

infact, if I put a = anything above 126, it is showing same question mark.

why so and how to rectify it?

  • 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-27T04:55:05+00:00Added an answer on May 27, 2026 at 4:55 am

    First of all, I doubt this is bash’s fault; bash just finds your program and runs it, while actually displaying your program’s output is the job of your terminal application. Secondly, there are no ASCII characters above 127. Trying to print a character in the range 128..255 will emit a byte with the given value, but how that byte gets displayed is determined by your terminal and how it’s configured. Most likely, your terminal expects all program output to be encoded in UTF-8; for backwards compatibility with ASCII, all bytes less than 128 are valid characters in UTF-8, but when bytes 128 and above are involved, only certain sequences are valid, and a lone byte with its high bit set is an error. Try printing the bytes 226, 152, and 131, in that order, from a single program; you’ll know that your terminal is using UTF-8 if you see a snowman.

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

Sidebar

Related Questions

i wrote a small prog : 1 #include<stdio.h> 2 main(){ 3 char* str =
I have a small program wrote in Prolog. At the moment I can print
I wrote a small program to check how many bytes char occupies in my
I wrote a small program to go through /usr/share/dict/words finding palindromes while(<>){ chomp; print
I want to write a small program that should print something like testing CPU...
I wrote a small program, that creates files at an interval of 1 minute.
I wrote a small program to test accessing a widget parent's slot. Basically, it
So I wrote a project-management program for a small business using Microsoft Access 2007.
I recently wrote a small number-crunching program that basically loops over an N-dimensional grid
I currently wrote a small program for a manager at work. It inputs an

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.