How can i find factorial of 100! ?
>> which data type can i use?.
>> I didnt get answer even i used double,long double data type.
Type: Posts; User: ganesh bala
How can i find factorial of 100! ?
>> which data type can i use?.
>> I didnt get answer even i used double,long double data type.
Thanks matsp for ur Timely help....
Now its Working ............
while...........
{
++i;
str=(char *)realloc(str,sizeof(char)*40*i);
How to read dynamically( any no of chars) from Keyboard using fgets...
I am new to fgets.. Help me please......
I tried ... where i have to make change...
int main()
I want to pass input and output file as command line arguments...
I want output file pointer have to be passed as argument to a function..
How can i do it? Is this Ok??
But I am getting...
Its not Home Work .. Just i want to know it ... ;):eek:
Thanks a lot vkaushal21..
I am just Learning Data structures..
Hi,
for this, 0123456789 i constructed Binary search tree... now,i want to know
preorder,postorder for this.....
...
First U have to Learn C.. Then only U can learn other Languages easily....
..
U Hav 2 clear in Basic like variables,constants,datatypes,conversions etc;.. then only its easy 4 learn other...
I m getting equal as output...
My doubt is float compared with double in if statement,
then it should b unequal right??
Is it something like type conversion?? I want just to clarify this...
f should b in single quote as it is a char...
use int main .. dont use void main..
:D Thanks tabstop for ur Simple and nice Explanation .. I understood
*--*++p+3 ==> i dnt know how this expr is evaluated... I m getting ck as output..
static char *s[]={"black","white","yellow","violet"};
char **ptr[]={s+3,s+2,s+1,s},***p,*gt;
...
addr=4 ... sizeof array is 5*4=20 .. right!! I m beginner.. thats why i was confused.. i try to avoid posting these type of questions!!
size of below arr is 20.. How it is??.. Can anyone explain it?...
char *a[]={"Oneon", "Twotw", "Three", "Fourinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn", "Fivei" };
In below code, I am getting following error.. why it happens? .. i
How to assign it to pointer str? [ without changing a[5][10] to other notation]
cannot convert `char (*)[10]' to `char**'...
Thanks laserlight.. i just used var-name as macro name to check which one gets printed..
Now i m clear.. Thanks zacs7 for pointing out.. i try to use proper English :-)..
I m getting output as 3 4.
How its evaluated? ..
My doubt is preprocessing happens b4 compiling.. then why first printf not printing 4..
Is it something like scope??
What about this??
printf(&a["Ya!Hello! how is this? %s\n"], &b["junk/super"]);
&a["WHAT%c%c%c %c%c %c !\n"]
How output from below printf was
"Hello! how is this? super
That is C! "
#include <stdio.h>
int main()
The following C program segfaults of IA-64, but works fine on IA-32.
int main()
{
int* p;
p = (int*)malloc(sizeof(int));
*p = 10;
return 0;
I m getting only "This is". as output.
How ????
printf("This is \x0x65 C \x0x66");
Can i assign address to a pointer Manually like this????
can anyone explain this???
int *ptr=0x4000;
Thanks matsp..
Still i m having doubt....
that means outerone will be exec'd first.. if so,
first one should also leads to a(34,56)... how 3456 is printed ??..
#include "stdio.h"
#define a(x,y) x##y
#define b(x) #x
#define c(x) b(x)
int main()
{
printf("%s\t",c(a(34,56)));
printf("%s\n",b(a(34,56)));
return 0;
}
#include<stdio.h>
#define MAX(x,y) ( x ) > ( y ) ? x:y
main()
{ int i=10,j=5,k=0;
k= MAX(i++,++j);
printf("%d %d %d ",i,j,k);
}
Ans:12 6 11