User Profile
Collapse
-
I think we can do that..... -
It will be helpful if u can give me an idea how to proceed atleast..Leave a comment:
-
It will be helpful if u can give me an idea how to proceed atleast.....Leave a comment:
-
It will be helpful if u can give me an idea how to proceed atleast.....Leave a comment:
-
-- nothing -- give a outline how to proceed, that will be helpful....Leave a comment:
-
compressor / de-compressor of a file
i want to write a c program --- compressor / de-compressor of a file which contains characters ‘1’,’2’, - - - ’F’. Compression should achieve at least 50% less size.
Please help.. -
sorting programming
How to write a C program which shows list of words with its occurrence in a file in alphabetical order? -
Parser programming in C
i want to write a C program which counts commented line, uncommented line and blank lines .
Basically a parser programming in C? -
Sort command in unix+ c program
I want to write a C program which is same as “sort” command of UNIX ?
Please help me in doing my project. -
for input as 'ffffffff' the output is -1.. thats fine but why -256 for ffffff00...Leave a comment:
-
-
memory
Hi All,
[CODE=c]int x;
scanf("%x",&x);
printf("%d",x);[/CODE]
If user gives the i/p as FFFFFF00 what is the o/p? -
OOps typing mistake.. Sorry man.. its:
i = strncmp("Nstris g","Nstring",6) ; now for i = strncmp("Nstris g","Astring",6) ;
Answer is 13 only.....Leave a comment:
-
Reg. strncmp
Hi All,
I have doubt in strncmp.
consider the following prog:
int main()
{
int i;
i = strncmp("Nstrin g","Astring",6) ;
printf("%d", i);
}
Here o/p is 13, now if i modify the prog like:
i = strncmp("Nstris g","Astring",6) ; O/P is 5 why??
ok ok.. got it !! while typing the... -
Now if we modify the program:
void myfun(int x)
{
if(x>0)
myfun(x--);
printf("%d",x);
}
int main()
{
myfun(5);
return 0;
}
This leads to Segmentation fault.. why?...Leave a comment:
-
Printf during Crash
Consider;
void crash(void)
{
printf("hello") ;
*((*char)0) = 0;
}
The above program leads to crash. Why?
Also string "hello" won't get printed. Why? -
Factorial..
Hi All,
I have a doubt
[code=c]
void myfun(int x)
{
if(x>0)
myfun(--x);
printf("%d",x);
}
int main()
{
myfun(5)
return 0;
}
[/code]
Here the output is : 0,0,1,2,3,4. Can you tell why?Last edited by sicarie; Jul 25 '07, 03:54 PM. Reason: Code tags are on the right when you reply/start a thread. Please use them. -
arunraj2002in started a topic How can I peek at the assembly code generated by GCC -- Structure padding.in CHow can I peek at the assembly code generated by GCC -- Structure padding.
gcc -O2 -S -c b.c gives the answer but if we declare a structure say
struct test_t {
int a;
char b;
int c;
};
main()
{
struct test_t test= { 13,30, 40};
}
Now in command prompt if we type gcc -O2 -S -c b.c will give output in b.s file as
30 .align 4
31 .LC0:
32 0000 0D000000 .long... -
Byte is the lowest level at which we can access the data, there is no bit type.
In fact we can't perform operation on single bit(only by some tricks we can do).. every bit wise operation will be aplied on a entire byte at a time..
So even if u apply bit field it will be applied to byte.. now if you use pack the also it will take minimum of byte only.
--Arun--Leave a comment:
-
Compiler padded structure as output.
Is their any way to find compiler padded structure as output.
Ex:
struct{ int a; char b; int c;} ..
now after padding the structure will be
struct{ int a; char b;pad1; pad2; int c;}.. i actually want this as an output. Is it possible & how?
No activity results to display
Show More
Leave a comment: