Guys, Thanks a lot for your replies.
could you please look in to this link which is most similart to my problem and requesting you to respond
Warning "cast increases required alignment of...
Type: Posts; User: karthik537
Guys, Thanks a lot for your replies.
could you please look in to this link which is most similart to my problem and requesting you to respond
Warning "cast increases required alignment of...
My question is correct grumpy. Because same kind of questions are there when googled, and they said about using "_attribute_ ((packed)); to the structure. But the problem here is the structure...
Googled for solution but very confused among "_attribute_ ((packed));" and "_attribute_ ((alligned) (x)) ;", which one to use and why?
I have two structures as below
struct prefix
{
u_char a;
u_char b;
u_char c;
u_char d;
int main()
{
int a = 10;
printf("val = %lu",(unsigned long int*) a);
return 0;
}
In the below structure, lets say
struct add {
int x;
char y;
};
the size of the structure add will be 8 bytes because of structure padding concept that 3 bytes will be padded to the char...
static int *p;
void main()
{
point_update(&p);
printf("%d",*p);
}
point_update(int **q)
{
Thanks laserlight!!.... So without the header file, if I put the forward declaration of function add in b.c file as
int add(int,int); without extern, will it work??
Hi,
I have 3 files as below
a.c:
int x(int a, int b)
{
return a + b;
Hello Guys,
Am looking for a clear explanation with example to differentiate between global and volatile variables. This was part of an interview question where the guy asked:
consider two...
Frnds.... help needed
Thanks a lot for your answer. Conceptually.... yes the scope varies.. so, static var in fun1() will be stored in Data Segment with the block scope .... and even the global var x will also be stored...
Hi frnds.. please help me in solving my doubt
In the below prog
#include.......
static int x = 10;
main()
{
If
int x = 0;
long int y = 0L;
In the second stmt, why 0L... Is there any problem in assigning y to 0?
Thank u very much tater....
struct student
{
int a;
char c;
}s1;
Actual size of the above structure is 3 bytes(lets say int is 2 bytes).
Is the declaration of above structure is correct or not as I...
Authors are also humans... They may make mistakes in their writings sometimes... Till now I didn't hear such kind of statement regarding variables anywhere....
And I think i can post any doubt...
Those random people might be good authors as well that we might don't know... my point is not to argue about the author...
I've read from a C book that the static and extern storage class variables are allocated memory from heap. Is it true?
Please tell me what is wrong in this....
From the definition of const qualifier, that the variable value cannot be changed in the current file, but can be changed in another file, I tried to write the program but resulted in segmentation...
..................
..................
char a[]="Hello";
char *b="World";
.................
.................
when I compiled the above program in linux using gcc -S, I found only "World" in...
yes ofcourse I want to see the assembly output of a c program... How? please help me
If you are doing unit testing of app.c then you need not concern about the code in the fucntion A(). You have to make ensure whether the function is getting called or not which you are doing it by...
I want see the object code in the object file..