How to change the entry point of gcc compiler ?

I mean the code will look like the bellow one.
[CODE]

include<stdio.h>

int entry() //this is the new entry point instead of main.
{
return 0;
}[/CODE]

thank you very much..

As char pointer takes only 8 bit .
[CODE]
main()
{
int i = 258; int iPtr = &i;
printf("%d %d",
((char)iPtr), ((char*)iPtr+1) );
}[/CODE]

In this program the bit orientation is 00000001 00000010.
First char pointerCODEiPtr[/CODE]point a address where the data is 00000010
and next address is containing 00000001.
So we are getting output as
2 1.

[B]That's also not different from saying this:[/B]

[CODE]
char a, b; / Not necessarily contiguous /
char c[5] / Contiguous /
[/CODE]

Its also has nothing to do with int , calloc or malloc.

I am not being childish, I am not understanding for what misunderstanding we are arguing on the same fact which we are talking about.

[QUOTE]Are you aware that the exact same code using calloc() has precisely the same result?[/QUOTE]

Yes i am aware about the fact.

[QUOTE][B]by me:-[/B]calloc() returns a block of memory which is contiguous[/QUOTE]
I was talking about:-
[CODE]
/contiguous/
int p;
p=(int
)calloc(5, sizeof(int));
[/CODE]

I also want to mean that malloc() is not contiguous for different allocation.
[CODE]
/not contiguous/
int p,a;
p=(int)malloc(sizeof(int));
a=(int
)malloc(sizeof(int));
[/CODE]

Any way i am a newbie and just a learner while you are an administrator. I may have represented the thing which can may create confusions as I should write calloc() returns a block of memory which may or mayn't contiguous instead, but calling any one idiot in a forum like this may hurt any one's prestige and feeling.
I request you to kindly delete my account from this forum.:icon_sad:

[QUOTE]The bytes allocated by malloc() (and calloc()) are required to be contiguous.[/QUOTE][CODE]
int p,a;
p=(int)malloc(sizeof(int));
a=(int
)malloc(sizeof(int));
[/CODE]
here memory need not to be contiguous.

[CODE]
int p;
p=(int
)malloc(5*sizeof(int));
[/CODE]

here memory allocation must be contiguous.

WaltP commented: How many times do we have to restate the same information answering a 3.5 year old thread? -4

which compiler you are using???

All the best.you can try from internet as well as some good book of c programming language..

Yes we are always here to help you. you have to mention properly what is your problem exactly. I mean you have to submit your wrong code then we will help you in you way.

In C malloc() returns bytes of memory which is need not to be contiguous.
like
[CODE]
int a;
a=(int
) malloc(sizeof(int));
[/CODE]
It returns some bytes (4 byte in some compiler) which is uninitialized.
Let take the address of a is 1002. If we try to assign memory to some other int pointer it may not be 1006.
on the other hand calloc() returns a block of memory which is contiguous and initialized to zero.

realloc() use to reallocate the memory which is already allocated in a dynamic way.

Hi everyone,
I want to compile a simple assembly language program like helloworld.asm in visual studio 6. I don't want to use MASM as assembler.
I want to include NASM as assembler.
please help me out.

thanks in advance..:D

Thank you Mr. WaltP for your point of view. It will really help me.

you can write whole the code of your project in a single source file.but it will create problem at the time of maintenance.

so you should make a module for a particular task.it will also help you at the time of debugging.

And try to use GCC compiler it is a standard one.
Never go for GOTO statement and function like getch().try to avoid the header file conio.h.

I want to compile an assembly program in NASM using MS visual studio 2010.

thanks..:D

if we can know what is the expected out put
then it will be better for us to help you.

[QUOTE=netuse;1638038]hi... :).. I have to generate a Timetable project by useing C program. i do't have no idea how to generate the code.. so please send me some codes.. and tell some idea to generate..
with your help, i try and complete my project.

                              Thanking you[/QUOTE] 

Let you start your project.
Then if there is any problem this forum will you.
All the best for your project..:D

[QUOTE=devanshee;1638456]i am confused that when to use '&' sign in arrays.
some times in string array or in character array i got confused.
bcz array name itself is an address .so an1 can plz help me out of this??[/QUOTE]

In C when we take input using scanf() function we have to take the address of the variable.
Here is some Example .I think it will make you clear.
[CODE]
int a;
scanf("%d",&i); //address of the variable

char a[10];
scanf("%s",a);//a stands for the base address of the string.

int b[10]

scanf("%d",b);//b is also the base address of the array .
[/CODE]

Hi..
I have downloaded grub source code from [url]ftp://ftp.gnu.org/gnu/grub[/url].
I have compiled that source code using ./configure then make command but i have not get any binary file.
Actually i want to use GRUB boot loader for my own Os.
please guide me.
I am very new here.

thanks in advance..:)