Posts
 
Reputation
Joined
Last Seen
Ranked #614
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
15
Posts with Upvotes
13
Upvoting Members
8
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
5 Commented Posts
~43.6K People Reached
PC Specs
Linux , Windows
Favorite Forums
Favorite Tags
Member Avatar for vvsmario
Member Avatar for Snehamathur

well.. i don't think there is anything left to comment but there is so many things to learn (specially for me) from the above post.. :)

Member Avatar for stephen.beatson
0
370
Member Avatar for vivekpriyadarsh
Member Avatar for TrueCoding

Try this code.. [CODE] # include <stdio.h> # define MAX 100 int main(void) { int oddcount, evencount; int array[MAX],i,n; printf("\n Enter Array Size (Between 1 to %d ): ",MAX); scanf("%d", &n); // User enters Array Size for(i = 0; i < n; i++) { printf("\n Enter %d value: ",i+1); scanf("%d", …

Member Avatar for Rushirl Quiño
0
2K
Member Avatar for Madawar

Well as Narue suggested.. scanf function leaves '\n' into buffer, so when it reaches [CODE] while((character=getchar())!= '\n')[/CODE] reads '\n' from buffer and loop terminates. after this you are using [CODE]puts(sentence);[/CODE] it will print some garbage value on screen bcoz your string is not terminated by a '\0' char. to overcome …

Member Avatar for plebbeh
0
1K
Member Avatar for Teelnaw

Before For loop initialize all elements of array hist_grade[6] to 0. line 22: why are you destroying all values of grade[i] to 0.. can't get the need of this line.. switch statement should me inside for loop.. line 24: [CODE]switch(grade[32])[/CODE] should'nt it be [CODE]switch(grade[i])[/CODE] line 28: how can you use …

Member Avatar for ari$av3s
0
268
Member Avatar for srisrisri

[CODE] char* my_strrev(char *p){ int i,l,temp; for(l=0;*(p+l+1);l++); for(i=0;i<l;i++,l--){ temp=p[i]; p[i]=p[l]; p[l]=temp; } return p; } [/CODE] This Function will work like strrev() Function...

Member Avatar for minhajakhter
0
303
Member Avatar for JDevelop

well.. i could not understand the need of copystring function in your program. you are using two pointer to char type of variables. when we deal with pointers then this could be done by = operator.. try this one. [CODE] #include <stdio.h> int main(){ char* string1="Hello World!!"; char* string2; printf("string1: …

Member Avatar for JDevelop
0
275
Member Avatar for anirudhruia

make your function as @Ancient Dragon says. and no need to print str1 using for loop in main function. just use [CODE] printf("%s",str1);[/CODE]

Member Avatar for WaltP
0
161
Member Avatar for mikecolistro

well... you just passing a 2D array as a 1D array. then just use this code [CODE] int findMin(int* array, int num_rows, int num_cols){ int min = *array; // or can use array[0] int i; for( i = 1; i < num_rows * num_cols; i++){ if(min > *(array + i)) …

Member Avatar for ravenous
0
166
Member Avatar for Ali5152

its wrong.. [CODE] struct LinkedList { int num; struct LinkedList *next; }; typedef struct LinkedList; NODE *node,*start,*temp; [/CODE] you are using [code] typedef struct LinkedList; [/code] change this line with [CODE]typedef struct LinkedList NODE;[/CODE]

Member Avatar for NP-complete
-2
381
Member Avatar for june 200090

Post your code here showing your effort towards solving this program.

Member Avatar for june 200090
0
170
Member Avatar for kapilsolanki84

" i just create 1 exe file so that when i double click it. it automatically runs & produces the required output.although the s/w itself produces the exe file. but it opens along with all the supported/assosciated files with it. i just require only 1 exe file. " i think …

Member Avatar for sharunkumar
0
3K
Member Avatar for vedro-compota
Member Avatar for phobos666

@ phobos666 you have just declared a char array [CODE] char airfoil[6]; [/CODE] that means it'll store 6 single char including '\0' char. you want to store 6 string having 3 char that means you need to declare a string array or can say 2 dimension char array. your program …

Member Avatar for vinitmittal2008
0
211
Member Avatar for hsetaknev

@hsetaknev line 4: [CODE] void main() [/CODE] main always returns a int value so it must be [CODE] int main() [/CODE] line 5: when you are asking to the user for the value of n then no need to initialize n=9. line 13: could'nt unserstand the need of /0 here …

Member Avatar for vinitmittal2008
-1
133
Member Avatar for Adami

you can use [CODE] while ( scanf( "%d", &ch) == 1 ) { .... .... } [/CODE] The vast majority of functions will give you some indication of success or failure. Especially with input it's best to make sure that the call succeeded before proceeding as if it did. In …

Member Avatar for Adami
0
136
Member Avatar for murtazamzk
Member Avatar for gaurav_13191

@ gaurav I am also using CODEBLOCKS and i compiled your program and its working fine. its showing sorted output after inputting desired values..

Member Avatar for vinitmittal2008
0
146
Member Avatar for gladius33

Why do'nt you use Array instead of using five variables. like int num[5]; Declare.. int max, min Use a loop and scan all values initialise max and min variable to num[0] now run a loop and compare all values of array num[5] with both variables..

Member Avatar for ajst
0
160
Member Avatar for vinitmittal2008

I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] …

Member Avatar for vinitmittal2008
0
217
Member Avatar for aria12

Post your code that you have tried and not working.. and please start new thread for new problem.. after your problem get solved mark your thread as solved..

Member Avatar for aria12
0
173
Member Avatar for johnloiebert

Embed your program code between code tags.. and use int main(void) instead of void main(void) Remove getch() from the end main always return a integer value so use return 0;

Member Avatar for vinitmittal2008
0
128
Member Avatar for vinitmittal2008

The Program is Addition of Large Integers.. Although This program is working But I want to know where i went wrong or what should i need to do to make it better.. [CODE] # include <stdio.h> # include <stdlib.h> # include <ctype.h> # include <string.h> typedef struct poly { int …

Member Avatar for vinitmittal2008
0
188
Member Avatar for halil.burak
Member Avatar for cmaheshwari16

If you want to create this function then try this one.. [CODE] void make_date(int *d,int *m,int *y,int days) { int flag=0,temp=0; // variable days must have positive integer value while(flag <days) { (*d) ++; if( (*m) == 4 || (*m) == 6 || (*m) == 9 || (*m) == 11) …

Member Avatar for sharathg.satya
0
8K
Member Avatar for vinitmittal2008

Let P1 and P2 are two polynominals.. where p1 = 1 + 4X^2 + x^4 and p2 = 2x^2 + x^4 program is to multiply p1 with p2 p3 = p1 * p2 Like line 1: ( 1 + 4x^2 + x^4) (2x^2 + x^4) line 2: 1*(2x^2 + x^4) …

Member Avatar for Shankye
0
147
Member Avatar for Snehamathur

For that you need a good knowledge of programming, like you need to know worst case complexity, best case complexity and Average time complexity. [URL="http://en.wikipedia.org/wiki/Computational_complexity_theory"] Read This[/URL]

Member Avatar for vinitmittal2008
0
288
Member Avatar for tanzi816

Its wrong way of passing a variable address to a Pointer [CODE] *nextRow = &row; // sets up an arbitrary "first guess" *nextColumn = &column; // with row, column both = 0 [/CODE] It should be [code] nextRow = &row; nextColumn = &column; [/code]

Member Avatar for vinitmittal2008
0
233
Member Avatar for TrueCoding

if you are not new to C language then you can use malloc or calloc function to create your Arrays..

Member Avatar for vinitmittal2008
0
487