473,397 Members | 1,985 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,397 software developers and data experts.

pointer int/char ...

bvb
Hi,
while declaring/defining pointer to int/char, What is doing the
compiler exactly . i'm able to get output(String) for all pointer to
char definition(without line # 8&14). But when i include line #8 &
line #14 Its only printing lines 10 & 11 & immediatly its giving seg
fault. Please give suggestion to understand the internal things abt
declaration/definition of pointer varibles.

1#include<stdio.h>
2
3 int main()
4 {
5 char *a="linux";
6 char *b="linux";
7 char *c="linux";
8 int *i=4;
9
10 printf("\n a = %s",a);
11 printf("\n b = %s",b);
12 printf("\n c = %s",c);
13
14 printf("\n i=%d",*i);
15
16 return 0;
17 }

NOTE:
Also i'm getting some strange result when just doing pointer to
interger declaration. (Sometimes i'm able to assign/print pointer to
interger variable values EVEN WITHOUT ALLOCATIG MEMORY)
OS : Linux 2.4.20-8 i686 i686 i386 GNU/Linux
Compiler : gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

ThankX in Advance.......

Urs
Saravanan.....
Nov 14 '05 #1
22 2654
bvb <bm******@fastem.com> scribbled the following:
Hi,
while declaring/defining pointer to int/char, What is doing the
compiler exactly . i'm able to get output(String) for all pointer to
char definition(without line # 8&14). But when i include line #8 &
line #14 Its only printing lines 10 & 11 & immediatly its giving seg
fault. Please give suggestion to understand the internal things abt
declaration/definition of pointer varibles.
You are causing undefined behaviour, first by assigning an integer
value to a pointer, then by indirecting through that pointer. Your
implementation probably implements this by trying to access address 4
in the virtual memory table, which very likely is in a part of memory
that does not belong to your processs, therefore causing a
segmentation fault.
What is it exactly that you are trying to do? Perhaps you want this:
int i = 4;
int *ip = &i;
1#include<stdio.h>
2
3 int main()
4 {
5 char *a="linux";
6 char *b="linux";
7 char *c="linux";
8 int *i=4;
9
10 printf("\n a = %s",a);
11 printf("\n b = %s",b);
12 printf("\n c = %s",c);
13
14 printf("\n i=%d",*i);
15
16 return 0;
17 } NOTE:
Also i'm getting some strange result when just doing pointer to
interger declaration. (Sometimes i'm able to assign/print pointer to
interger variable values EVEN WITHOUT ALLOCATIG MEMORY)
This is just sheer dumb luck. Undefined behaviour means that anything
can happen: your program might even appear to work.
OS : Linux 2.4.20-8 i686 i686 i386 GNU/Linux
Compiler : gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
This is not relevant to comp.lang.c.
ThankX in Advance....... Urs
Saravanan.....


I didn't know you were a bear.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"How come even in my fantasies everyone is a jerk?"
- Daria Morgendorfer
Nov 14 '05 #2
In <d5**************************@posting.google.com > bm******@fastem.com (bvb) writes:
Hi,
while declaring/defining pointer to int/char, What is doing the
compiler exactly . i'm able to get output(String) for all pointer to
char definition(without line # 8&14). But when i include line #8 &
line #14 Its only printing lines 10 & 11 & immediatly its giving seg
fault. Please give suggestion to understand the internal things abt
declaration/definition of pointer varibles.

1#include<stdio.h>
2
3 int main()
4 {
5 char *a="linux";
6 char *b="linux";
7 char *c="linux";
8 int *i=4;
Does your compiler silently accept the above line?!? I can't believe
that!
9
10 printf("\n a = %s",a);
11 printf("\n b = %s",b);
12 printf("\n c = %s",c);
13
14 printf("\n i=%d",*i);
15
16 return 0;
17 }

NOTE:
Also i'm getting some strange result when just doing pointer to
interger declaration. (Sometimes i'm able to assign/print pointer to
interger variable values EVEN WITHOUT ALLOCATIG MEMORY)
OS : Linux 2.4.20-8 i686 i686 i386 GNU/Linux
Compiler : gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)


Then, your compiler is issuing the following diagnostic:

test.c:8: warning: initialization makes pointer from integer without a cast

You got exactly what you deserved for ignoring it. If the compiler is
telling you that your code is incorrect, what's the point in executing it,
anyway, without fixing it?

Anyway, the FAQ is explaining how to initialise pointers properly.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #3
In <cc**********@oravannahka.helsinki.fi> Joona I Palaste <pa*****@cc.helsinki.fi> writes:
bvb <bm******@fastem.com> scribbled the following:
OS : Linux 2.4.20-8 i686 i686 i386 GNU/Linux
Compiler : gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)


This is not relevant to comp.lang.c.


When the OP has no clue about the source of the problem, it is a *good*
idea to mention such details. For all he knows, the code might be correct
but is hitting a bug in the implementation. And we have seen such cases
in the past, related to bugs in Microsoft compilers.

It is sheer stupidity to discourage people from providing such
information.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #4
On Fri, 8 Jul 2004, bvb wrote:
Hi,
while declaring/defining pointer to int/char, What is doing the
compiler exactly . i'm able to get output(String) for all pointer to
char definition(without line # 8&14). But when i include line #8 &
line #14 Its only printing lines 10 & 11 & immediatly its giving seg
fault. Please give suggestion to understand the internal things abt
declaration/definition of pointer varibles.

1#include<stdio.h>
2
3 int main()
4 {
5 char *a="linux";
6 char *b="linux";
7 char *c="linux";
Line 7 the expression "linux" evaluates to the memory address that the
string "linux" will reside at. So if this string ends up at memory
location 1000, this is the same as:

char *c = (char *)1000;
or
char *c;
c = (char *)1000;
8 int *i=4;
Line 8 is the same as:

int *i;
i = 4;

Thus, you have set the pointer to reference memory address 4.
9
10 printf("\n a = %s",a);
11 printf("\n b = %s",b);
12 printf("\n c = %s",c);
13
14 printf("\n i=%d",*i);
This is telling the compiler to printf the integer at memory location 4.
That is, of i == 4 then *i is the integer at memory location 4. Most
likely, the operating system has sensitive information at memory location
4 so it is blocking your program from peeking at this memory location.
15
16 return 0;
17 }

NOTE:
Also i'm getting some strange result when just doing pointer to
interger declaration. (Sometimes i'm able to assign/print pointer to
interger variable values EVEN WITHOUT ALLOCATIG MEMORY)


This is called undefined behaviour. There are things in C where the
behaviour is undefined. This means that it could work on your computer but
not on might. It could work on Tuesdays at 4pm but never on Wednesdays at
3:17am. You just never know. Because of the uncertainty of undefined
behaviour you should avoid it at all costs.

--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov
Nov 14 '05 #5
bvb <bm******@fastem.com> spoke thus:

<mode="nitpick">
3 int main() int main( void ) /* better */ 4 {
5 char *a="linux"; const char *a="linux"; /* a good idea */ 6 char *b="linux"; /* ditto */ 7 char *c="linux"; /* ditto */ 8 int *i=4;
13
14 printf("\n i=%d",*i); /* some implementations require a newline at the end
of output, no reason not to include one */ 15
16 return 0;
17 }


--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #6
Joona I Palaste wrote:
You are causing undefined behaviour, first by assigning an integer
value to a pointer,
Chapter and verse on this, please. My understanding is that it's
implementation-defined.
then by indirecting through that pointer.


This is correct.


Brian Rodenborn
Nov 14 '05 #7
j

"Darrell Grainger" <da*****@NOMORESPAMcs.utoronto.ca.com> wrote in message
news:Pi*******************************@drj.pf...
On Fri, 8 Jul 2004, bvb wrote:
Hi,
while declaring/defining pointer to int/char, What is doing the
compiler exactly . i'm able to get output(String) for all pointer to
char definition(without line # 8&14). But when i include line #8 &
line #14 Its only printing lines 10 & 11 & immediatly its giving seg
fault. Please give suggestion to understand the internal things abt
declaration/definition of pointer varibles.

1#include<stdio.h>
2
3 int main()
4 {
5 char *a="linux";
6 char *b="linux";
7 char *c="linux";
Line 7 the expression "linux" evaluates to the memory address that the
string "linux" will reside at. So if this string ends up at memory
location 1000, this is the same as:

char *c = (char *)1000;
or
char *c;
c = (char *)1000;
8 int *i=4;


Line 8 is the same as:

int *i;
i = 4;


You are mistaken. The value of ``i'' is initially indeterminate.
You then assign the integer ``4'' to ``i''.

int *i = 4;

Here, ``i'' has an initial value which is not indeterminate.

The two are not the same.

Thus, you have set the pointer to reference memory address 4.
9
10 printf("\n a = %s",a);
11 printf("\n b = %s",b);
12 printf("\n c = %s",c);
13
14 printf("\n i=%d",*i);


This is telling the compiler to printf the integer at memory location 4.
That is, of i == 4 then *i is the integer at memory location 4. Most
likely, the operating system has sensitive information at memory location
4 so it is blocking your program from peeking at this memory location.
15
16 return 0;
17 }

NOTE:
Also i'm getting some strange result when just doing pointer to
interger declaration. (Sometimes i'm able to assign/print pointer to
interger variable values EVEN WITHOUT ALLOCATIG MEMORY)


This is called undefined behaviour. There are things in C where the
behaviour is undefined. This means that it could work on your computer but
not on might. It could work on Tuesdays at 4pm but never on Wednesdays at
3:17am. You just never know. Because of the uncertainty of undefined
behaviour you should avoid it at all costs.

--
Send e-mail to: darrell at cs dot toronto dot edu
Don't send e-mail to vi************@whitehouse.gov

Nov 14 '05 #8
On Fri, 9 Jul 2004 16:21:18 GMT, Default User
<fi********@boeing.com.invalid> wrote in comp.lang.c:
Joona I Palaste wrote:
You are causing undefined behaviour, first by assigning an integer
value to a pointer,
Chapter and verse on this, please. My understanding is that it's
implementation-defined.


With a cast, the result is implementation-defined. As written by the
op, which I have replaced since you snipped it:
8 int *i=4;


....it is a constraint violation (6.5.4 paragraph 3 and 6.16.1
paragraph 1). So the compiler is required to emit a diagnostic.

Curiously, the standard neither forbids an implementation from
producing an executable in the presence of a constraint violation, so
long as it issues a diagnostic, nor does it state specifically that
executing a program that contained a constraint violation is undefined
behavior. But it surely is.
then by indirecting through that pointer.


This is correct.


Indeed.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #9
"Default User" <fi********@boeing.com.invalid> wrote in message
news:40***************@boeing.com.invalid...
Joona I Palaste wrote:

[re: int *i=4;]

You are causing undefined behaviour, first by assigning an integer
value to a pointer,


Chapter and verse on this, please. My understanding is that it's
implementation-defined.


The assignment of an uncasted integer to a pointer violates the constraint 6.5.16.1p1.
[Whether it's undefined behaviour is apparently a separate issue.]

The conversion of an int to a pointer via cast is implementation-defined, but subject to
various problems...
then by indirecting through that pointer.


This is correct.


Only if the pointer is a not suitably aligned, is a trap representation, or does not point
to an entity of the referenced type. [cf 6.3.2.3p5]

In the code above, there is no guarantee that the exceptions are excluded.

--
Peter
Nov 14 '05 #10
Jack Klein <ja*******@spamcop.net> wrote:
Curiously, the standard neither forbids an implementation from
producing an executable in the presence of a constraint violation, so
long as it issues a diagnostic, nor does it state specifically that
executing a program that contained a constraint violation is undefined
behavior.


Erm, yes, it does, in 4#2:

# 2 If a ‘‘shall’’ or ‘‘shall not’’ requirement that appears outside of
# a constraint is violated, the behavior is undefined.

Richard
Nov 14 '05 #11
>Jack Klein <ja*******@spamcop.net> wrote:
Curiously, the standard neither forbids an implementation from
producing an executable in the presence of a constraint violation, so
long as it issues a diagnostic, nor does it state specifically that
executing a program that contained a constraint violation is undefined
behavior.

In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:Erm, yes, it does, in 4#2:

# 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement
[incidentally, please do something about these invalid characters,
if you can]
that appears outside of a constraint is violated, the behavior is undefined.


But Jack Klein is talking about a shall or shall-not phrase that
appears *inside* a constraint (and hence, as he noted, requires
a diagnostic).

I do not find it particularly curious (that "anything further,
deponent sayeth not") since the diagnostic gives the implementation
license to stop translation. If that implementation goes on and
produces an executable, and the user runs it, so what? The Standard
has required a diagnostic, and permitted the implementor to stop;
that the implementor and user have colluded to continue anyway is
their problem. :-)
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
Nov 14 '05 #12
Chris Torek <no****@torek.net> wrote:
In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:
Jack Klein <ja*******@spamcop.net> wrote:
Curiously, the standard neither forbids an implementation from
producing an executable in the presence of a constraint violation, so
long as it issues a diagnostic, nor does it state specifically that
executing a program that contained a constraint violation is undefined
behavior.
Erm, yes, it does, in 4#2:

# 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement


[incidentally, please do something about these invalid characters,
if you can]


Hey, that's not Free Agent's usual behaviour... wonder what went wrong.
that appears outside of a constraint is violated, the behavior is undefined.


But Jack Klein is talking about a shall or shall-not phrase that
appears *inside* a constraint (and hence, as he noted, requires
a diagnostic).


Erm. I blame the turpentine (I'm painting my house).

Richard
Nov 14 '05 #13
In <6r********************************@4ax.com> Jack Klein <ja*******@spamcop.net> writes:
Curiously, the standard neither forbids an implementation from
producing an executable in the presence of a constraint violation, so
long as it issues a diagnostic, nor does it state specifically that
executing a program that contained a constraint violation is undefined
behavior. But it surely is.


The subsection ordering inside a section of the standard is not chosen
at random. The first section is dealing with syntax. Violate it
and the rest of the section no longer applies. The next sections
are constraints. Violate them and the semantic sections that follow
no longer apply.

So, it's undefined behaviour by lack of definition of behaviour, a
possibility explicitly allowed by the standard.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #14
On Mon, 12 Jul 2004 11:46:00 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Chris Torek <no****@torek.net> wrote:
In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:
>
># 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement


[incidentally, please do something about these invalid characters,
if you can]


Hey, that's not Free Agent's usual behaviour... wonder what went wrong.


I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #15
Mark McIntyre <ma**********@spamcop.net> writes:
On Mon, 12 Jul 2004 11:46:00 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Chris Torek <no****@torek.net> wrote:
In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:
>
># 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement

[incidentally, please do something about these invalid characters,
if you can]


Hey, that's not Free Agent's usual behaviour... wonder what went wrong.


I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.
--
Ben Pfaff
email: bl*@cs.stanford.edu
web: http://benpfaff.org
Nov 14 '05 #16
In <87************@benpfaff.org> Ben Pfaff <bl*@cs.stanford.edu> writes:
Mark McIntyre <ma**********@spamcop.net> writes:
On Mon, 12 Jul 2004 11:46:00 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Chris Torek <no****@torek.net> wrote:

In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:
>
># 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement

[incidentally, please do something about these invalid characters,
if you can]

Hey, that's not Free Agent's usual behaviour... wonder what went wrong.


I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


You must be talking about '\221' and '\222'. Not exactly the same
thing...

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #17
In <l6********************************@4ax.com> Mark McIntyre <ma**********@spamcop.net> writes:
On Mon, 12 Jul 2004 11:46:00 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Chris Torek <no****@torek.net> wrote:
In article <news:40****************@news.individual.net>
Richard Bos <rl*@hoekstra-uitgeverij.nl> writes:
>
># 2 If a 0x910x91shall0x920x92 or 0x910x91shall not0x920x92 requirement

[incidentally, please do something about these invalid characters,
if you can]


Hey, that's not Free Agent's usual behaviour... wonder what went wrong.


I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


Typical Mark McIntyre logic: if I don't see it, it does NOT exist.

I didn't see them either, but then, I didn't expect to: my news client
simply ignores arbitrary non-printable character codes. In the ISO 8859
8-bit extensions to ASCII, the range 0x80..0x9F is reserved for
additional control characters. As usual, Microsoft knows better.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #18
On Mon, 12 Jul 2004 15:00:24 -0700, in comp.lang.c , Ben Pfaff
<bl*@cs.stanford.edu> wrote:
Mark McIntyre <ma**********@spamcop.net> writes:

I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


I don't follow at all - there's nothing there either in the post or in teh
raw message, not \x221 or 0x91 or anything - but its OT so I'm not sure I
really care...

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #19
Mark McIntyre <ma**********@spamcop.net> writes:
On Mon, 12 Jul 2004 15:00:24 -0700, in comp.lang.c , Ben Pfaff
<bl*@cs.stanford.edu> wrote:
Mark McIntyre <ma**********@spamcop.net> writes:

I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


I don't follow at all - there's nothing there either in the post or in teh
raw message, not \x221 or 0x91 or anything - but its OT so I'm not sure I
really care...


Er, I mean \221 and \222 not the \x versions. But those
characters are definitely in article
<40****************@news.individual.net> as it showed up at my
newsswerver.
--
"Some programming practices beg for errors;
this one is like calling an 800 number
and having errors delivered to your door."
--Steve McConnell
Nov 14 '05 #20
Ben Pfaff <bl*@cs.stanford.edu> wrote:
Mark McIntyre <ma**********@spamcop.net> writes:
On Mon, 12 Jul 2004 11:46:00 GMT, in comp.lang.c ,
rl*@hoekstra-uitgeverij.nl (Richard Bos) wrote:
Hey, that's not Free Agent's usual behaviour... wonder what went wrong.


I didn't see them here until Chris quoted you so I siuspect its his server
rather than your client.


If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


I found it. And no, it's not the M$ dumb quotes problem; Word suffers
from that, and I can only assume that so might Outlook, Express or not,
but Free Agent doesn't.
However, I was quoting from the PDF which was posted here some time ago,
not from my usual n896.txt. It has those kinds of quotes throughout;
which, for it, isn't as dumb as for a newsreader and not as dumb as
mangling my own text, either, but simply typograpic convention.

Richard
Nov 14 '05 #21
On Mon, 12 Jul 2004 15:00:24 -0700, Ben Pfaff <bl*@cs.stanford.edu> wrote:
If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


Not so. It's the news reader, most likely. Agent shows the angled
apostrophes correctly.
--
#include <standard.disclaimer>
_
Kevin D Quitt USA 91387-4454 96.37% of all statistics are made up
Per the FCA, this address may not be added to any commercial mail list
Nov 14 '05 #22
Kevin D. Quitt <KQ**********@IEEIncUNMUNG.com> wrote:
On Mon, 12 Jul 2004 15:00:24 -0700, Ben Pfaff <bl*@cs.stanford.edu> wrote:
If you're running Microsoft Windows you won't see them. This is
the Microsoft dumbquotes problem, in which '\x221' and '\x222'
get substituted for ` and ' respectively.


Not so. It's the news reader, most likely. Agent shows the angled
apostrophes correctly.


If it showed them correctly, it did not show them at all; those dumb
quotes aren't part of ISO-8859, but of Microsoft WinLatin-1. My Free
Agent shows them, too (so I didn't notice them when I posted them), but
that's because this is a M$ Windows machine, and therefore broken as
well.

Richard
Nov 14 '05 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Chris Mantoulidis | last post by:
I see some really weird output from this program (compiled with GCC 3.3.2 under Linux). #include <iostream> using namespace std; int main() { char *s; s = "test1"; cout << "s = " << s << "...
4
by: Bryan Parkoff | last post by:
I want to allocate pointer array into memory so pointer array contains ten pointers. It would be 4 bytes per pointer to be total 40 bytes. Looks like below for example. unsigned char* A = new...
35
by: tuko | last post by:
Hello kind people. Can someone explain please the following code? /* Create Storage Space For The Texture */ AUX_RGBImageRec *TextureImage; /* Line 1*/ /* Set The Pointer To NULL...
16
by: junky_fellow | last post by:
According to Section A6.6 Pointers and Integers (k & R) " A pointer to one type may be converted to a pointer to another type. The resulting pointer may cause addressing exceptions if the...
204
by: Alexei A. Frounze | last post by:
Hi all, I have a question regarding the gcc behavior (gcc version 3.3.4). On the following test program it emits a warning: #include <stdio.h> int aInt2 = {0,1,2,4,9,16}; int aInt3 =...
5
by: max | last post by:
Dear all, I did the following analysis to conclude that the following pointer types are not compatible. Please let me know If my analysis and interpretation of the C standard are correct: ...
15
by: khan | last post by:
Hi, I read that pointer representation can non-zero bit pattern, machine specific.Compiler when comes accross value '0' in pointer context, converts it to machine specific null pointer...
5
by: mdh | last post by:
Hi all, I have gone through the FAQ and done searches in the Comp.Lang and if I have missed it please let me have the ref. (Question generated in part by p119). Given char a;
10
by: Ahmad Humayun | last post by:
Whats the difference between: char str1 = "wxyz"; char* str2 = "abcd"; I can do this: str2 = str1 but I can't do this: str1 = str2
8
by: tfelb | last post by:
Hey group! I have 2 questions. I saw functions with char *dst = (char *)src. In that case if I remember what I've learned I assign (an) (the) address of src to dst. Right? But I can assign...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

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.