Sponsored Content
Full Discussion: Pointers and array
Top Forums Programming Pointers and array Post 302854117 by yifangt on Monday 16th of September 2013 06:28:41 PM
Old 09-16-2013
No, I did not get you.
As per the question is to use (*pa)[1] = &a[1][0]; (*ppa)[3][2] = &a[1] to reach "r", what is the correct answer although multiple addresses can print it out? Need more digestion. Can you suggest a good reference book about this? Thanks a lot!

Last edited by yifangt; 09-16-2013 at 07:37 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

Pointers and array

hi all, let say i have a pointer exit, and this exit will store some value. how can i store the value that the pointer points to into an array and then print them out from the array. thanks in advance (2 Replies)
Discussion started by: dianazheng
2 Replies

2. Programming

pointers

is this a valid c declaration int (*ptr(int *b)); plz explain... (4 Replies)
Discussion started by: areef4u
4 Replies

3. Programming

pointers

Hi I mash with pointers in C. I solve this problem about 5 hours and I don't know how I should continue. void InsertFirst (tList *L, int val) { tElemPtr new; if((new = malloc(sizeof(tElemPtr))) == NULL) Error(); new->data = val; new->ptr = L->frst; L->frst = new;... (2 Replies)
Discussion started by: Milla
2 Replies

4. Programming

restricted pointers

Hi all. I am trying to use restricted pointers to allow the gcc compiler optimize the code, but I have not been able to make it work so far. I am testing with this code: #include <stdlib.h> #include <stdio.h> #include <time.h> #include <sys/time.h> void vecmult(int n, int * restrict a, int... (0 Replies)
Discussion started by: carl.alv
0 Replies

5. UNIX for Advanced & Expert Users

shared pointers

I am new to shared pointer conceot in C++ and hence require some clarification: For example: class A { public: virtual ~A() { } int x; }; typedef boost::shared_ptr<A>... (1 Reply)
Discussion started by: uunniixx
1 Replies

6. Programming

Need help with the Pointers in C

I have a special character called ô. When it is declared as a character variable its showing it can be printed. But when it is declared as a character pointer variable its showing it cannot be printed. I am just wondering why its happening like this.. c1 = '@'; c2 = 'ô'; char *fp; fp="XXô"; if... (1 Reply)
Discussion started by: sivakumar.rj
1 Replies

7. Programming

Problem with array of pointers

Hi All, I am using the array of pointers and storing the address of string.This is a global list. So i am using extern to give the reference of this list to another file and using reading the data from this string. But list is being corrupted and string is missing some characters in... (2 Replies)
Discussion started by: lovevijay03
2 Replies

8. Programming

Traversing in Array of pointers

Please find the below program. the requirement and description of the program also given: ganesh@ubuntu:~/my_programs/c/letusc/chap9$ cat fa.c.old /* Program : write a program to count the number of 'e' in thefollowing array of pointers to strings: char *s = { "We will teach you how... (12 Replies)
Discussion started by: ramkrix
12 Replies

9. Programming

Problem With Pointers

Hi guys. What is the difference between these: 1. int *a; 2. int (*a); (2 Replies)
Discussion started by: majid.merkava
2 Replies

10. Programming

How to Declare an array of function pointers?

I am attempting to create an array of function pointers. The examples I follow to do this are from: support.microsoft.com/en-us/help/30580/how-to-declare-an-array-of-pointers-to-functions-in-visual-c ... (3 Replies)
Discussion started by: spflanze
3 Replies
Net::DNS::Header(3)					User Contributed Perl Documentation				       Net::DNS::Header(3)

NAME
Net::DNS::Header - DNS packet header class SYNOPSIS
"use Net::DNS::Header;" DESCRIPTION
A "Net::DNS::Header" object represents the header portion of a DNS packet. METHODS
new $header = Net::DNS::Header->new; $header = Net::DNS::Header->new($data); Without an argument, "new" creates a header object appropriate for making a DNS query. If "new" is passed a reference to a scalar containing DNS packet data, it creates a header object from that data. Returns undef if unable to create a header object (e.g., if the data is incomplete). print $header->print; Dumps the header data to the standard output. string print $header->string; Returns a string representation of the header object. id print "query id = ", $header->id, " "; $header->id(1234); Gets or sets the query identification number. qr print "query response flag = ", $header->qr, " "; $header->qr(0); Gets or sets the query response flag. opcode print "query opcode = ", $header->opcode, " "; $header->opcode("UPDATE"); Gets or sets the query opcode (the purpose of the query). aa print "answer is ", $header->aa ? "" : "non-", "authoritative "; $header->aa(0); Gets or sets the authoritative answer flag. tc print "packet is ", $header->tc ? "" : "not ", "truncated "; $header->tc(0); Gets or sets the truncated packet flag. rd print "recursion was ", $header->rd ? "" : "not ", "desired "; $header->rd(0); Gets or sets the recursion desired flag. cd print "checking was ", $header->cd ? "not" : "", "desired "; $header->cd(0); Gets or sets the checking disabled flag. ra print "recursion is ", $header->ra ? "" : "not ", "available "; $header->ra(0); Gets or sets the recursion available flag. rcode print "query response code = ", $header->rcode, " "; $header->rcode("SERVFAIL"); Gets or sets the query response code (the status of the query). qdcount, zocount print "# of question records: ", $header->qdcount, " "; $header->qdcount(2); Gets or sets the number of records in the question section of the packet. In dynamic update packets, this field is known as "zocount" and refers to the number of RRs in the zone section. ancount, prcount print "# of answer records: ", $header->ancount, " "; $header->ancount(5); Gets or sets the number of records in the answer section of the packet. In dynamic update packets, this field is known as "prcount" and refers to the number of RRs in the prerequisite section. nscount, upcount print "# of authority records: ", $header->nscount, " "; $header->nscount(2); Gets or sets the number of records in the authority section of the packet. In dynamic update packets, this field is known as "upcount" and refers to the number of RRs in the update section. arcount, adcount print "# of additional records: ", $header->arcount, " "; $header->arcount(3); Gets or sets the number of records in the additional section of the packet. In dynamic update packets, this field is known as "adcount". data $hdata = $header->data; Returns the header data in binary format, appropriate for use in a DNS query packet. COPYRIGHT
Copyright (c) 1997-2000 Michael Fuhr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perl(1), Net::DNS, Net::DNS::Resolver, Net::DNS::Packet, Net::DNS::Update, Net::DNS::Question, Net::DNS::RR, RFC 1035 Section 4.1.1 perl v5.8.0 2002-10-12 Net::DNS::Header(3)
All times are GMT -4. The time now is 02:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy