Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c x 15
java x 3
c++ x 1
Member Avatar for gman1991

i want to run a program into terminal as well as putting in the numbers like this suppose u have a xyz.cpp file in home and want to run it in terminal ./xyz <num1> <num2> eg ./xyy 3 5 and outputing 8 ------- all this in the terminal is there …

Member Avatar for myk45
0
66
Member Avatar for gman1991

[CODE]int main(void) { int operations, i, operands; char *string_dig1, *string_dig2; // OPEN THE FILE FILE *ifp; ifp = fopen("bigint.txt", "r"); fscanf (ifp, "%d", &operations); printf("%d\n", operations); // MAKE MEMORY TO READ THE STRING DIGITS INTO THE ARRAY string_dig1 = (char *)malloc(sizeof(char)); string_dig2 = (char *)malloc(sizeof(char)); for(i = 0; i <= …

Member Avatar for gman1991
0
236
Member Avatar for gman1991

using the standard function in atoi() wont work. it gives me an error that says "assignment makes pointer from integer without a cast" this is sample of the code.. [CODE]struct integer* convert_integer(char* stringInt) { struct integer* convertedInt_1; char* stringArray3 = (char *) malloc (sizeof(char));; free(stringArray3); stringArray3 = stringInt; convertedInt_1->digits = …

Member Avatar for Adak
0
192
Member Avatar for gman1991

ive been looking up, and their seems to be many way to read from a file. my question is, how do you read from a file. the file setup is like this.... the first line is a number(830) representing number of words, next lines are words.. the file looks like …

Member Avatar for Aviras
0
224
Member Avatar for gman1991

[CODE]// this is program designed to create Cd data base #include <stdio.h> #include <string.h> #include <stdlib.h> //============================================= //LINKED LIST USED FOR CREATING THE DATABASE CD //============================================= struct CD_type_node { int CDnum; char title[20]; int CDcount; struct CD_type_node* next; }; struct Artist_type_node // to create a linked list of CD's { …

Member Avatar for WaltP
0
120
Member Avatar for gman1991

[CODE]//====================================================== //this is the grading sorting program for part one //====================================================== #include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZE 10 int main() { FILE *ifp; // file pointer, points to the file char filename[32]; // store file name int ID [SIZE],grade[SIZE]; int i; int sum_grades = 0; //opening file by …

Member Avatar for Salem
0
122
Member Avatar for gman1991

[CODE]// this is the grading sorting program for part one #include <stdio.h> int main(int argc, char **argv) { FILE *fp; // file pointer, points to the file char file_name[32]; // store file name int ID[50]; int grade[50]; int a,b; // index variables int student_id, grades; // opening file by asking …

Member Avatar for abhimanipal
0
156
Member Avatar for gman1991

[CODE]#include <stdio.h> #define CALORIES 150 #define WEIGHT 15 int main() { double beer; double money_spent; double total_spent; double total_beer_consumed; double total_calories_consumed; double weight_gain; printf("On average, how many beers will you consume each day?\n"); scanf("%lf\n", &beer); printf("On average, how much will you pay for each can of beer?\n"); scanf("%lf\n", &money_spent); // …

Member Avatar for gman1991
0
106
Member Avatar for gman1991

import java.util.Scanner; public class FirstProgram { public static void main(String[]args) { Scanner input = new Scanner(System.in); int x = 3; int num1, num2, num3, num4; while (x <= 3) { System.out.println("enter a number 1,2,3>"); num1 = input.nextInt(); num2 = input.nextInt(); num3 = input.nextInt(); num4 = input.nextInt(); { if (num1 == …

Member Avatar for gman1991
0
88