Compiler doesn't play dice.....
Can u make out when does it give segmentation fault and when the garbage value...
Type: Posts; User: Tanuj_Tanmay
Compiler doesn't play dice.....
Can u make out when does it give segmentation fault and when the garbage value...
But if store some value there...it will print it
example
#include<stdio.h>
int main()
{
int c[] = {2,5,6,8,3,6};
c[-1] = 57;
printf("%d",c[-1]);
why will C compiler give error if you try to access a memory.....
the only differnece here is you haven't stored any value there...
it will definitely print some value...but it will be a GARBAGE.
...
many errors....
i)after u made ur data type named 'a',why r u using struct always....
remember its like others ..int,float....why complicate it....
ii)how will main() know that u changed...
I nearly got ur question......
Pls be more specific.....
Expand ur main()
int a,b;
a=10;
b=10;
printf("%d\n",a++);
printf("%d\n",++b);
OUTPUT:
10
Require help in the program to solve Tower Of Hanoi.....
The rule of the game can be found on http://en.wikipedia.org/wiki/Tower_of_hanoi
....what's the logic...
@matsp...kernel hacker...
you got it...that was the logic i used...
thanx Philip...nice work...
u had completely different logic.....
its always nice to know different methods to solve a particular problem..
//I finally did it....couldn't check for "fairly large numbers"....but it works...
#include<stdio.h>
int lastNonZero(int n);
int main()
{
the number can be 100....factorial of which is impossible for me to find....but my program sud give correct output to it...without actually calculating its factorial..
I need an efficient program to print last non zero digit of n!...n can be fairly large number