473,383 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

How do I Displaying bytes of a given code bellow?

I have a problem in displaying bytes in the following bellow,
Expand|Select|Wrap|Line Numbers
  1. #include<stdio.h>
  2. #include<conio.h>
  3. int main()
  4. {
  5. int a = 0;
  6. printf(the value of a is %d\n it is located at memory number %x\n it contains "a, &a);
  7. getche();
  8. return0;
  9. }
Nov 3 '12 #1
2 1705
weaknessforcats
9,208 Expert Mod 8TB
The code logic looks OK but you have some syntax errors in the printf and return statements that are stopping you from compiling.

Please use code tags.
Nov 3 '12 #2
I am not a C expert. But i would try to give my inputs regarding your post. You can try them
1. There are syntax errors as 'weaknessforcats' mentioned.
a. return 0;
b. the beginning double quotes for the printf are missing.
2. For printing the adress (pointer), i would use %p specifier instead of the %d specifier. Adress would never be signed and on some systems, it could 62bit for 32 bit integers.

Others please correct me if i am wrong.
Nov 3 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Coco | last post by:
Hi! I managed to display chinese character in my web form (.aspx), in certain situation i need to to set the text of the label of my web form in chinese character programatically which is done in...
2
by: Astra | last post by:
Hi All Bit of a dilemma here. I'm doing a content management system, whereby the user can enter the HTML code for a currency symbol, eg &pound; for £. My problem is that when I bring this...
1
by: VB for me | last post by:
Is there a way to toggle the option of displaying spaces / tabs as special characters in the VS.2003 code editor. Right now it only displays an empty space, for a blank, I want it to display a "."...
4
by: hugo2 | last post by:
Most of these characters are not on the standard keyboard. Here's a successful contrivance, with comments & cautions, a little page that works in IE6. <HTML><HEAD><SCRIPT TYPE="text/javascript">...
0
by: Coco | last post by:
Hi! I have been searching for solution for the problem i am facing in displaying chinese character in my aspx page initially when i created the aspx page with some chinese chaarcter, it worked...
22
by: santosh | last post by:
I've written the following function to return a string of arbitrary length from stdin. So far, it seems to work as it should. Are there any unportable assumptions and/or logical errors in the code?...
4
by: gkumar007 | last post by:
Greetings, Are there any HTML editors which support syntax highlighting of c program source code. Let's say I write my html code as follows: <html> <body> <code> #include<stdio.h>
0
by: Seven_Ever | last post by:
Hi, Situation is: - I have a set of small webpages (in simple html format) I'd like to display in a ListView. All of them are the same size. I though about creating a custom ListView control...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.