Sponsored Content
Top Forums Programming int *ptr + max possible value Post 302237586 by era on Thursday 18th of September 2008 01:16:27 AM
Old 09-18-2008
Depends in practice on the compiler suite. POSIX and C89 and other standards define constants which you can query and use in your programs; look for MAXINT and friends.

Code:
vbvntv$ gcc -E - <<HERE | tail -1
> #include <values.h>
> MAXINT
> HERE
2147483647

The standard solution for big files is to use "long int" although again what exactly that means in practice depends on the compiler etc.

It's not really clear why you are asking about pointers. Pointers by definition work on memory addresses, and the type of the memory address they point to (the number of bytes to use beyond the pointed-to address) is independent of the location in memory.
 

9 More Discussions You Might Find Interesting

1. Programming

Reg: char ptr - Coredumps

#include <stdio.h> void main() { int Index=1; char *Type=NULL; Type = (char *)Index; printf("%s",Type); } Getting coredump (5 Replies)
Discussion started by: vijaysabari
5 Replies

2. Programming

difference between int ** func() and int *& func()

What is the difference between int** func() and int*& func(). Can you please explain it with suitable example. Thanks, Devesh. (1 Reply)
Discussion started by: devesh
1 Replies

3. Programming

file ptr.

Is there any way to know the filename from an available file pointer. (2 Replies)
Discussion started by: bankpro
2 Replies

4. AIX

Configuring Color Laser ptr in AIX

Hi All, I have Network color laser printer which is to be configured in AIX5L. The Model of the printer is OKI C3200. Will it is supported with AIX 5..? I could not find any drivers for this. Will any compatible drivers are available for this printer... I tried with the default drivers hplj-4... (2 Replies)
Discussion started by: helloajith
2 Replies

5. UNIX for Dummies Questions & Answers

int open(const char *pathname, int flags, mode_t mode) doubt...

hello everybody! I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(){ int fileDescriptor; fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies

6. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

7. Programming

'int air_date' '%'?

int air_date='20100103'; //2010 - Jan - 03 /* My goal here is to subtract a day. */ int day = air_date % 100; //?????? Is this right? //Are there any functions time/date for this type of date format? :cool: (7 Replies)
Discussion started by: sepoto
7 Replies

8. Solaris

how to get rid off the warning: CC: Warning: Option -ptr not supported?

Hi I am getting the below error /bin/mkdir -p ./obj/SunOS10_32/SingleThread/Debug/CC_5_3 /bin/mkdir -p ./bin/SunOS10_32/SingleThread/Debug/CC_5_3 CC -c -ptr./obj/SunOS10_32/SingleThread/Debug/CC_5_3 -V -I/opt/tuxedo/tuxedo11gR1/include -I. -I../../OBED_SA_1-27a/include... (1 Reply)
Discussion started by: deboprio
1 Replies

9. Solaris

Cannot resolve PTR record issue

Hi guys, I am currently receiving the following output in /var/log/syslog and is occurring every second leading to /var directory being full after every 2 days. Aug 20 17:32:29 opaldn1 sendmail: r7KCOlQm002517: ruleset=check_rcpt, arg1=<postmaster@silverapp6>, relay=, reject=450 4.4.0... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
end(3C) 																   end(3C)

NAME
end, edata, etext, __data_start, __text_start - last locations in program SYNOPSIS
DESCRIPTION
These names refer neither to routines nor to locations with interesting contents. The address of the symbols and is the first address above the program text. The address of and is the first address above the initialized data region. The address of and is the first address above the uninitialized data region. The address of the symbol is the beginning address of the program's data area, and is the beginning address of the program's text area. The linker defines these symbols with the appropriate values if they are referenced by the program but not defined. The linker issues an error if the user attempts to define or When execution begins, the program break (the first location beyond the data) coincides with but the program break can be reset by the rou- tines of brk(2), malloc(3C), standard input/output (stdio(3S)), the profile option of cc(1), and so on. Thus, the current value of the program break should be determined by (see brk(2)). WARNINGS
In C, these names must look like addresses. Thus, use instead of to access the current value of end. SEE ALSO
System Tools cc(1) Invoke the HP-UX C compiler ld(1) Invoke the link editor Miscellaneous brk(2) Change data segment space allocation crt0(3) Execution startup routine malloc(3C) Main memory allocator stdio(3S) Standard buffered input/output stream file package STANDARDS CONFORMANCE
end(3C)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy