- 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:
I am trying to figure out what I'm doing wrong with this code to keep getting errors, its a simple trip planner for a class I am taking however it will not compile and is giving me these errors: C:\Documents and Settings\Justin\Desktop\trip.c In function `main': 24 C:\Documents and Settings\Justin\Desktop\trip.c syntax … | |
Re:
this is our homework... // make a c program that will ask any number from the user. //Output all numbers multiples of 3 from number to 30. [ICODE]// make a c program that will ask any number from the user. //Output all numbers multiples of 3 from nuber to 30. … | |
[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:
Below is my prime generator, it works fine only thing it gives me 1 more prime than i want eg., if num=40, i need primes uptill 40 but it gives me 41 also...i want it to stop at 37. It works fine with 90. sample run ======== Enter the number:40 … |
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:
Hi I've been think about this for a while but the answer eludes me. I know its a pretty simple program but here's the snippet: [code] int main(void){ printf("Enter the operation of your choice\n"); int a; int b; int ch; while((ch = getChoice()) != 'q'){ printf("enter a value: "); if(scanf("%d", … | |
Re:
Hi... I've been trying to make a program where the input is txt file, and the output will be saved in txt file. But, I keep getting error Message. My code looks like this: [code] #include <stdlib.h> #include <stdio.h> int main (){ int i,j; float H [100][100]; FILE*in; in=fopen("0.txt","rt"); FILE*out; … | |
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 … |