Hi all,
what is %p format specifier indicates in the printf statement?
regards,
Jay 7 39318
"jayapal" <ja********@gmail.comschrieb im Newsbeitrag
news:11**********************@k35g2000prh.googlegr oups.com...
Hi all,
what is %p format specifier indicates in the printf statement?
it is to print a pointer. The format of that isn't specified in the standard
Bye, Jojo
jayapal wrote:
Hi all,
what is %p format specifier indicates in the printf statement?
It's purpose is to print a pointer value in an implementation defined
format. The corresponding argument must be a void * value.
On Oct 30, 11:47 am, santosh <santosh....@gmail.comwrote:
jayapal wrote:
Hi all,
what is %p format specifier indicates in the printf statement?
The value of the void * object will be converted to a sequence of
printing characters, in an implementation-defined way.
To be realistic, most implementations use a hexademical string
representation of the value.
On Oct 30, 2:35 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
"jayapal" <jayapal...@gmail.comschrieb im Newsbeitragnews:11**********************@k35g2000p rh.googlegroups.com...Hi all,
what is %p format specifier indicates in the printf statement?
it is to print a pointer. The format of that isn't specified in the standard
Bye, Jojo
pointer in the sense the address of the variable?
Is %u and %p are same?
"jayapal" <ja********@gmail.comschrieb im Newsbeitrag
news:11**********************@e34g2000pro.googlegr oups.com...
On Oct 30, 2:35 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
>"jayapal" <jayapal...@gmail.comschrieb im Newsbeitragnews:11**********************@k35g2000 prh.googlegroups.com...> Hi all,
what is %p format specifier indicates in the printf statement?
it is to print a pointer. The format of that isn't specified in the standard
Bye, Jojo
pointer in the sense the address of the variable?
for example
Is %u and %p are same?
no
Bye, Jojo
jayapal <ja********@gmail.comwrites:
what is %p format specifier indicates in the printf statement?
What does your textbook say?
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
On Tue, 30 Oct 2007 09:07:06 -0700, jayapal wrote:
On Oct 30, 2:35 pm, "Joachim Schmitz" <nospam.j...@schmitz-digital.de>
wrote:
>"jayapal" <jayapal...@gmail.comschrieb im Newsbeitragnews:11**********************@k35g2000p rh.googlegroups.com...Hi all,
what is %p format specifier indicates in the printf statement?
it is to print a pointer. The format of that isn't specified in the standard
pointer in the sense the address of the variable?
It has to be a pointer to void. You can convert an address into
one with a cast:
printf("%p\n", (void *)&var);
Is %u and %p are same?
No. %u is for printing an unsigned int in decimal.
--
Army1987 (Replace "NOSPAM" with "email")
A hamburger is better than nothing.
Nothing is better than eternal happiness.
Therefore, a hamburger is better than eternal happiness. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: aditya |
last post by:
hi,
Can anybody please tell me that how the following printf(...)
statement works-
main(){
int d=9;
printf("%d",printf("%d"));
return 0;
|
by: Money |
last post by:
Here in this thread
http://groups.google.co.in/group/comp.lang.c/browse_frm/thread/c16d280238a95c9/e3b0dbf76f3e02e3?q=finding+endianness&rnum=1#e3b0dbf76f3e02e3
Tydr Schnubbis in 3rd reply used...
|
by: dis_is_eagle |
last post by:
Hi.i dont know exactly how the format specifier %d works.please explain
the following program.
int main()
{
int k=5;
printf("k=%*d",k,k);
return 0;
}
It gives the output of k= 5.If I omit...
|
by: =?Utf-8?B?Um9ubmllIFNtaXRo?= |
last post by:
Hello,
I would like to be able to accept a format string in the form of say {0:D2}
as an input from a dialog box, and then dynamically format the output string
based on this new format...
|
by: asit |
last post by:
plz fix the bug...
#include <stdio.h>
int main()
{
char ch;
char i;
printf("Enter an unsigned char : ");
scanf("%d",&ch);
|
by: dissectcode |
last post by:
Hello - I am looking at a scanf function that takes in a 16 bit unsigned int(UINT16), but its format specifier is %hd. According to
...
|
by: codinginc |
last post by:
Hi Everyone,
Is it possible to insert format specifier in a form of variable. See example below
Standard from
char result;
float fnum = 3.14159;
sprintf( result, "%f", fnum );...
|
by: amarniit |
last post by:
I am making a project on the basis of numbers........here i need that i print a bigger number whose lenght is more than 300 digits....... while i am doing it in C than i am getting a problem my all...
|
by: mohan77 |
last post by:
I am reading a character array which has value 9.9999 into a double variable using sscanf. the statement is like this:
double dvar1;
char cvar = "9.9999";
sscanf(cvar, "%lG", &dvar);...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |