473,796 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is wrong with this

Hi,
I have declared pointer of pointers **a;
so In a loop I assign a block to a pointer and put a value in it
and then I want to print these values.

My following program doesnt work.

Also How to do same program with int *a[]; (array of pointers).
Any help would really help.

#include <stdio.h>
#include <conio.h>
#include <malloc.h>

void main()
{
int **a;
int v=0;

for (v=0;v<5;v++)
{
*(a+v)=(int *)malloc(sizeof (int));
**(a+v)=v;
}

for (v=0;v<5;v++)
{
printf("%d\n",* *(a+v));
}

exit(0);

}

Feb 24 '06
27 1819
"Richard G. Riley" <rg****@gmail.c om> writes:
On 2006-02-27, Vladimir S. Oka <no****@btopenw orld.com> wrote:
fr*******@yahoo .com wrote:

Silly phonetic abbreviations can be /very/ hard for non-native English
speakers to decode. I'm sure you do have some consideration (if not
respect) for them, don't you? Otherwise: Hau vud ju lajk if aj vrote in
vot aj konsider tu be fonetik ingli??

Even for native or fluent English speakers they require extra effort to
decode (unless they learned it from age 3, I guess).

Also, /especially/ people who /really/ understand C (C++ is
off-topic,


In many circles constant /hiliting/ is seen as obnoxious and
boring. It lights my newsreader like a beacon and for those that don't
support it, it breaks up the English. Please refrain from doing it so
frequently. It is really, really nasty.


He did no hiliting whatsoever. Any hiliting done is solely from your
newsreader. If you don't like it, see if you can turn it off.

As to the comment about it's handling in newsreaders that "don't
support it": the conventions for denoting /italics/, *strong* emphasis
and _underlining_ where widely accepted waaayyyy before any
newsreaders were written to treat them specially, so it's very clearly
an invalid point. If it broke up English so much, nobody would've
started using it in the first place.

Again, if you don't like it, reconfigure your newsreader. It may not
support such a reconfiguration , but if that's the case, I consider
that a mildly broken implementation. Everyone should have the right to
view unaltered, verbatim text.

And /you/, as a newcomer, certainly have no place in correcting the
format or style of message posting of an established regular.

-Micah
Feb 27 '06 #21
On 2006-02-27, Micah Cowan <mi***@cowan.na me> wrote:
"Richard G. Riley" <rg****@gmail.c om> writes:
On 2006-02-27, Vladimir S. Oka <no****@btopenw orld.com> wrote:
> fr*******@yahoo .com wrote:
>

> Silly phonetic abbreviations can be /very/ hard for non-native English
> speakers to decode. I'm sure you do have some consideration (if not
> respect) for them, don't you? Otherwise: Hau vud ju lajk if aj vrote in
> vot aj konsider tu be fonetik ingli??
>
> Even for native or fluent English speakers they require extra effort to
> decode (unless they learned it from age 3, I guess).
>
> Also, /especially/ people who /really/ understand C (C++ is
> off-topic,


In many circles constant /hiliting/ is seen as obnoxious and
boring. It lights my newsreader like a beacon and for those that don't
support it, it breaks up the English. Please refrain from doing it so
frequently. It is really, really nasty.


He did no hiliting whatsoever. Any hiliting done is solely from your
newsreader. If you don't like it, see if you can turn it off.

As to the comment about it's handling in newsreaders that "don't
support it": the conventions for denoting /italics/, *strong* emphasis
and _underlining_ where widely accepted waaayyyy before any
newsreaders were written to treat them specially, so it's very clearly
an invalid point. If it broke up English so much, nobody would've
started using it in the first place.

Again, if you don't like it, reconfigure your newsreader. It may not
support such a reconfiguration , but if that's the case, I consider
that a mildly broken implementation. Everyone should have the right to
view unaltered, verbatim text.

And /you/, as a newcomer, certainly have no place in correcting the
format or style of message posting of an established regular.


I generally consider /this/ to denote a regular expression, and _this_
is italics.
Feb 27 '06 #22
On 2006-02-27, Micah Cowan <mi***@cowan.na me> wrote:
"Richard G. Riley" <rg****@gmail.c om> writes:
On 2006-02-27, Vladimir S. Oka <no****@btopenw orld.com> wrote:
> fr*******@yahoo .com wrote:
>
> Silly phonetic abbreviations can be /very/ hard for non-native English
> speakers to decode. I'm sure you do have some consideration (if not
> respect) for them, don't you? Otherwise: Hau vud ju lajk if aj vrote in
> vot aj konsider tu be fonetik ingli??
>
> Even for native or fluent English speakers they require extra effort to
> decode (unless they learned it from age 3, I guess).
>
> Also, /especially/ people who /really/ understand C (C++ is
> off-topic,


In many circles constant /hiliting/ is seen as obnoxious and
boring. It lights my newsreader like a beacon and for those that don't
support it, it breaks up the English. Please refrain from doing it so
frequently. It is really, really nasty.


He did no hiliting whatsoever. Any hiliting done is solely from your
newsreader. If you don't like it, see if you can turn it off.


/this/ is hiliting :however you want to read it. It is not conformat
to natural reading of the English language. Think of it as annoying to
me as "u" is to others. Used in its place it has a use (not/ very
/other/ word in an vain attempt to gain the moral higer ground.
As to the comment about it's handling in newsreaders that "don't
support it": the conventions for denoting /italics/, *strong* emphasis
and _underlining_ where widely accepted waaayyyy before any
newsreaders were written to treat them specially, so it's very clearly
an invalid point. If it broke up English so much, nobody would've
started using it in the first place.
Rubbish. I dont buy that at all. Ive been reading NGs for donkey years
and Ive never seen so much smug hiliting as in this one.

Again, if you don't like it, reconfigure your newsreader. It may not
support such a reconfiguration , but if that's the case, I consider
that a mildly broken implementation. Everyone should have the right to
view unaltered, verbatim text.
Actually, you might be right there. Unfortunately its only the one
poster who insists on using it to death. Occasional hiliting is
fine. Would you not agree that hiliting 20% of your post somewhat
diminishes the /reasons/ for hiliting?

And /you/, as a newcomer, certainly have no place in correcting the
format or style of message posting of an established regular.
Oh please. My "newness" to this group is really unrelated to the
constant repeated, arrogant posts from some of the established
regulars that seem to have nothing better to do than constantly post
the same nannying corrections day in , day out. And for you to even
/hilite/ the respect I ought to give a "regular" based on their time
here is so laughable as to, well, make me laugh.

-Micah


Richard.

--
Remove evomer to reply
Feb 27 '06 #23
"Richard G. Riley" <rg****@gmail.c om> writes:
Again, if you don't like it, reconfigure your newsreader. It may not
support such a reconfiguration , but if that's the case, I consider
that a mildly broken implementation. Everyone should have the right to
view unaltered, verbatim text.
Actually, you might be right there. Unfortunately its only the one
poster who insists on using it to death.


It is also only one poster who seems to mind it.
Occasional hiliting is
fine. Would you not agree that hiliting 20% of your post somewhat
diminishes the /reasons/ for hiliting?
Once again, it is /not/ hiliting. It's denoting
emphasis/italics. Hiliting is what your own newsreader does with it.

As to the 20% thing: if the post's content is greater than around 15
words, I'd agree with you. If it's five words, I certainly
wouldn't. And I would be very interested in a citation from you for a
specific post by Vlad that has more than 10 words, with 20% "hiliting".
And /you/, as a newcomer, certainly have no place in correcting the
format or style of message posting of an established regular.


Oh please. My "newness" to this group is really unrelated to the
constant repeated, arrogant posts from some of the established
regulars that seem to have nothing better to do than constantly post
the same nannying corrections day in , day out.


No. But it is very related to how much your opinion matters on this
newsgroup, versus how much a regular's opinion: especially given the
experience level of several of them. You can hardly expect to waltz in
here and start demanding we change the way we post, especially given
that you have obviously zero respect to our own such requests.
And for you to even
/hilite/ the respect I ought to give a "regular" based on their time
here is so laughable as to, well, make me laugh.


Ooh, how clever.
Feb 27 '06 #24
Micah Cowan wrote:
"Richard G. Riley" <rg****@gmail.c om> writes:
.... snip ...

In many circles constant /hiliting/ is seen as obnoxious and
boring. It lights my newsreader like a beacon and for those that
don't support it, it breaks up the English. Please refrain from
doing it so frequently. It is really, really nasty.

.... snip ...
Again, if you don't like it, reconfigure your newsreader. It may
not support such a reconfiguration , but if that's the case, I
consider that a mildly broken implementation. Everyone should
have the right to view unaltered, verbatim text.

And /you/, as a newcomer, certainly have no place in correcting
the format or style of message posting of an established regular.


And this is coming from someone who, if I remember aright, made
himself so obnoxious over topicality that he is plonked by a fair
number of readers. I can vouch for at least one. I am assuming
your attributions are correct.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell. org/google/>
Also see <http://www.safalra.com/special/googlegroupsrep ly/>
Feb 28 '06 #25
Dear group members, gurus,

I am really sorry for writing such stuff which was against the group
regulations. Actually it was my cousine who had a problem with his code
and I asked her to post it to the group under my name. I had no idea
that this gal will fry some of the finest brains here.
Not to mention I have asked her to refrain and get her own membershio
to the group. :)
Kindly review my previous posts . I have never insulted anyone in the
past.

I hope you can understand and hope to continue to offer precious help.

Thanks,

Cric.

Feb 28 '06 #26
fr*******@yahoo .com wrote:
Dear group members, gurus,

I am really sorry for writing such stuff which was against the group
regulations. Actually it was my cousine who had a problem with his
code and I asked her to post it to the group under my name.


You're using Google, why would this cousin need to use your account?

Brian
--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Feb 28 '06 #27
This cousine of mine is only 12 years old. Her parents dont allow her
to use internet.
Its just she came to my place and by chance the issue came, as I am not
that expert, I asked her to use my system as well as my id.

Default User wrote:
fr*******@yahoo .com wrote:
Dear group members, gurus,

I am really sorry for writing such stuff which was against the group
regulations. Actually it was my cousine who had a problem with his
code and I asked her to post it to the group under my name.


You're using Google, why would this cousin need to use your account?

Brian
--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.


Mar 1 '06 #28

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

Similar topics

3
2384
by: Mike Henley | last post by:
I first came across rebol a while ago; it seemed interesting but then i was put off by its proprietary nature, although the core of the language is a free download. Recently however, i can't help but say i was totally impressed. I needed an open source wikiblog/wikilog, whatever you wanna call it, basically a hybrid of a blog and a wiki. I checked out snipsnap, which uses java, it was said on their site to be a clone of vanilla, a...
72
5900
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for example, between a C/C++ programmers with a few weeks of experience and a C/C++ programmer with years of experience. You don't really need to understand the subtle details or use the obscure features of either language
121
10186
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather than a PHP IDE. It only supports basic IntelliSense (or code completion) and doesn't have anything...
28
3281
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr(); fopen("c:\\autoexec.bat","r")&&printf("success") || printf("error opeing
9
2125
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
3
2150
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when Record (i) is shown and modified, the change will come to Record (i+1). Can anyone provide suggestion? thanks.
89
5775
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the right thing to use for every var that holds the number of or size in bytes of things. * size_t should only be used when dealing with library functions.
20
2821
by: Daniel.C | last post by:
Hello. I just copied this code from my book with no modification : #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0;
24
3106
by: MU | last post by:
Hello I have some code that sets a dropdownlist control with a parameter from the querystring. However, when the querystring is empty, I get an error. Here is my code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then
2
2235
by: mingke | last post by:
Hi... So I have problem with my if condition..I don't know what's wrong but it keeps resulting the wrong answer.... So here's the part of my code I have problem with: for (i=0; i<size2; i++){ for (k = 0; k < point3; k++){
0
9685
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7558
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6800
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4127
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.