- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
[CODE] #include<stdio.h> int main() { int a[100], i=0; while(1) { a[i++]=5; printf("%d\n",i); } return 0; } [/CODE] on gcc this code doesn't give ny error. but after printing the value of i upto 100 , it restart writing value of i from 6 onward... my question is how value of … | |
Re: So finally this guy has COMPLETED his home work. congrates... | |
Re: dude, i can suggest a different approach for ur problem.... since 30 is divisible by 3 so start ur loop from 30 and subtract 3 each time and print until ur number becomes less than the input number... this approach will print number between ur input and 30 but in … | |
[CODE] #include<stdio.h> int main() { int i=10,j=30; printf("%d %d",i,j); // this line printing value of i and j...works fine printf("%d %d"); // this line again printing value of i and j printf("%d"); // this line printing value of i return 0; } [/CODE] On gcc compiler, 2nd and third printf() … | |
here is the code.... [CODE] #include<stdio.h> int main() { int *k; *k=10; printf("%d %d",k,*k); return 0; } [/CODE] it compile perfectly. but on executing it is giving segmentation fault. where is the problem? | |
[CODE] //#include<iostream> class std { public: int i; }; int main() { std A; //float f=0.0f; } [/CODE] error: ‘struct std’ redeclared as different kind of symbol error: previous declaration of ‘namespace std { }’ on compiling , above error comes. we are not including any header file.....then how compiler … | |
| Re: For finding prime numbers upto a given no, Use "The Sieve of Eratosthenes algorithm"[URL="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes"]http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes[/URL] that is a gud way to find out effectively |
Hello friends, i have some doubt and hope i will get an satisfactory answer from here. 1) Can memory addresses be negative........i have initialized an array and check the address of element and found it negative...so i want to know can it be negative and if yes then how addresses … | |
Re: When we use getchar() then whatever input we give it goes in a buffer and getchar function reads from that buffer. when first time u entered ur choice it stored in buffer (say u choose a,then buffer will contain a,\n).so first time , getchar picks the choice u supplied but … | |
Re: i don't get salem's argument....i ran ur program on gcc and it's working fine. no erroe at all. | |
Hello friends, I have have found lots of ways to implement a stack using different data structures. But i want to what us the best way (best means code understandability , performance) to implement a stack!! Share ur thought so i can reach to any final answer. Different ways ->1. … | |
Hello ppl, m computer science student and have learnt c&c++ and want to learn a new language in which i can create gui application with gud performance...i found that java and c# can be 2 option..so which will be best and useful...c# or java???? i found that java is a … |