Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c x 13
Member Avatar for gyuunyuu

I found numerous examples on converting infix expression to postfix expression but my program needs to include some functions like sqrt(x), min/max(x,y), fact(x), abs(x). abs(‐5) is converted to ‐5 abs 120 – (45+3) is converted to 120 45 3 + ‐ (3^2 + 4^5)*fact(3) is converted to 3 2 ^ …

Member Avatar for thekashyap
0
130
Member Avatar for gyuunyuu

I have found numerous examples involving only arithmetic operations but mine requires to deal with functions - min(x, y), max(x, y), sqrt(x), abs(x), fact(x). What I don't understand is how my program can interpret those functions and set the precedence for them. Examples: 4 + 5 -> 4 5 + …

Member Avatar for gyuunyuu
0
417
Member Avatar for gyuunyuu

I need to read words from a text file, build a structure to store the word and its occurrence. From what I was told from my TA, I need to read words, determine its size (how many chars) and allocate memory for its size. Then I need to build an …

Member Avatar for gyuunyuu
0
164
Member Avatar for gyuunyuu

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int count; // counter to use the word's occurrence char word[99]; } word; char str[99]; word myword[50]; int main() { FILE *myfile; if ((myfile = fopen("wordlist", "r")) == NULL) { printf("\n Error:Can't open file \n "); exit(0); } int position = …

Member Avatar for Adak
0
131
Member Avatar for gyuunyuu

[CODE]#include <stdio.h> #include <string.h> typedef struct { int count; // counter to use the word's occurrence char *word; } word; int main() { word myword[50]; FILE *myfile; if ((myfile = fopen("wordlist", "r")) == NULL) { printf("\n Error:Can't open file \n "); exit(0); } char str[99]; int position = 0; while …

Member Avatar for kings_mitra
0
99
Member Avatar for gyuunyuu

I'm supposed to read all the words from text file and use bubble sort to sort the word and count their occurrence. As I read each word from file, what is the exact thing I need to do? Do I need to store the word (as char array) somewhere to …

Member Avatar for thekashyap
0
201
Member Avatar for gyuunyuu

I understand the concept of bubble sort and have no trouble implementing it, but I can't grasp the concept of doing it for 2D array. I've googled for some resources but I was unable to understand those codes. So let's say I have a 2D char array with words (maximum …

Member Avatar for Adak
0
1K