15,552 Topics

Member Avatar for
Member Avatar for jzamora28

hi I am a high school student in a programing class and I need help writing my C program. If someone is willing to help me please let me know if I can contact you by email. Thank you. Jess

Member Avatar for Stuugie
0
63
Member Avatar for COKEDUDE

I am trying to calculate the size of char *. I would would think one of these 2 methods would work but they are not. char *vertices; printf(strlen(vertices)); printf(sizeof(vertices));

Member Avatar for Ancient Dragon
0
261
Member Avatar for sing1006

int menu(c){ int choose; do{ printf("*MENU\n"); printf("*Press 2 to move down\n"); printf("*Press 4 to move left\n"); printf("*Press 6 to move right\n"); printf("*Press 8 to move up\n"); printf("*Press 5 to switch\n"); printf("*Press 0 to quit\n"); printf("Please enter your choose: "); scanf("%i",&choose); if(choose==2){ }else if(choose==4){ }else if(choose==6){ }else if(choose==8){ }else if(choose==5){ }else …

Member Avatar for deceptikon
0
210
Member Avatar for toniann.midori

Im having problems creating a function that checks how many times a number shows up in the array The array is already sorted im trying to loop through the array and theres be a counter to keep track of the number of times it appears and then a second array …

Member Avatar for Ancient Dragon
0
203
Member Avatar for COKEDUDE

I am trying to print a char array on separate line for each element. This is what I have tried and neither way is working. I would like the output to look something like. The array length is c c The array length is o o The array length is …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for laleh.97

 We estimate pi.  We assume as in Figure 10 is a side of the square.  The first type, which defines a function IsInCircle Quadrant is the point or not.  intIsInCircle (floatx, floaty);  The number of random points that are inside the square, the Number of …

Member Avatar for rubberman
0
225
Member Avatar for alon4963

How to set rand command, an integer from 3 to 50 (inclusive), but save it as a decimal number

Member Avatar for deceptikon
0
197
Member Avatar for strRusty_gal

Hi Everyone, I need help with my assignment but i only require assistance to give me some guidance on the issue. I need to write code in c linux programming, that can change directory [CD]. when you open the command prompt in the linux machine, you type cd .. or …

Member Avatar for strRusty_gal
0
238
Member Avatar for sahar.97

Write a program with Recursive function that for every step will receive input from a number of until the digits 0 entered. After entering the digits 0 It should be entered into the numbers entering printed in reverse order Track.

Member Avatar for Tumlee
0
174
Member Avatar for ~s.o.s~

Here is a simple implementation of implementing a simple Left trim (ltrim) and Right trim(rtim) of unwanted characters from a C style string. (null terminated strings). Doesn't suffer the overheads of the memmove implementation in which the worst case scenario (a string containing all junk characters) is approx. N^2 / …

Member Avatar for Ancient Dragon
0
3K
Member Avatar for Prithvi.R.K
Member Avatar for Prithvi.R.K
0
203
Member Avatar for newbie14

I have my codes working where I got separate date and time columns. I would like to add one more column which have both date and time in. For the existing codes this how I did sprintf(all,'%02d:%02d:%02d.%06u%03u',CURDATE(),s / 3600, (s % 3600) / 60, s % 60, usec, nsec) I …

Member Avatar for newbie14
0
294
Member Avatar for Trekker182

Hi everyone I had a few more quick questions...I'm trying to right the function that puts the correct letters in the right positons being reported from my previous compareletter function for my game of hang man and its not updating the word in progress array. Here's my function: //updates the …

Member Avatar for Trekker182
0
166
Member Avatar for Prithvi.R.K

case 3: Complement(a,m); that is the function call in main function void Complement(int a[10],int m) { int i,k; int c[20]={0,1,2,3,4,5,6,7,8,9}; for(i=0;i<=m;i++) { if(!a[] == c[]) { printf("\n%d",c[20]); } } }

Member Avatar for Prithvi.R.K
0
131
Member Avatar for Prithvi.R.K

I could like to take help from any of you to write a c code for finding complement of a set. i am a begginer so i need your help. thanks

Member Avatar for Moschops
0
72
Member Avatar for v.r.t
Member Avatar for vegaseat
0
155
Member Avatar for Trekker182

Hello everyone, I'm trying to do a game of hang man by comparing whats in one char array with another with a for loop with the compareword function. I tested it out with the wrong letters and had it return -1 so that parts working. What isn't fully working is …

Member Avatar for Trekker182
0
255
Member Avatar for dan4oto

Hello guys! I have some trouble with that "Do you want to continue" thing in C. I am begginer. Well my problem is to fix this one: ..... int sum_count_arithmeticaverage() { int n = 0; char answer; int array[1024]; int sum = 0, count = 0, arithmeticaverage; int i = …

Member Avatar for Nishali
0
132
Member Avatar for victor_3

The game is to play hangman, if guessed right or wrong it will ask the user if they want to play another game (w/ a different word). My code repeats the game with the user enters anything (even q) but doesnt quit when 'q' is entered. I've been trying to …

Member Avatar for victor_3
0
206
Member Avatar for Prithvi.R.K

I was trying to write a code for union and intersection of two sets but i got an error which states clrscr and exit are not declared in scope. I have included the header files but still i get this error. Can some one help me out in this?

Member Avatar for Prithvi.R.K
0
1K
Member Avatar for pheonixkid

Hi, i'm trying to make 3 different input scenarios using argv. In the code below where there is just one input so when it is argv[0] the calendar for this month comes up, when it is argv[1] so when there are two inputs, it will printout the calendar for the …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for foxhatxd

The following is a function I wrote to go along with a minesweeper program. For some crazy reason, the inner loop gets skipped after i begins to increment. For example, after i and j have been reduced by one: n = 3, k =3 i = 0 j = 0, …

Member Avatar for foxhatxd
0
164
Member Avatar for ragnacrap

Does anybody know how to make a program that calculates your work hours? I tried this code, but it's going all wrong. #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<ctype.h> #include<string.h> #include<time.h> char* timein[5], timeout[5], p; int totaltime, ticktock, hour, minute, rate; FILE* f; int main(){ clrscr(); CreateTimeFile(); GetTimes(); DisplayFinalInfo(); getch(); } CreateTimeFile(){ f …

Member Avatar for Banfa
0
330
Member Avatar for ragnacrap

I'm doing a C program where the user is asked to enter an employee number. I know how to make the program ask again if the number doesn't exist. However, I don't know how to have the program check it from a *.txt file like this. EMP10-1234,smith_john,2 EMP08-0321,kent_brenda,1 EMP10-0501,delcambre_kory,3 EMP11-0112,pregeant_mark,3 …

Member Avatar for ragnacrap
0
377
Member Avatar for Warren_1

Here is my code.... #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> struct data{ int CustomerID; char Forename[15]; char Surname[20]; }; void CreateID (); //int checksize(); //void check number(); void CreateFirst (); int checklen(); int checknum(); void CreateLast(); int checklength(); //int checknumber(); void ViewRecord(); int main() { struct data records[2000]; …

Member Avatar for Warren_1
0
130
Member Avatar for smdjilani
Member Avatar for Ancient Dragon
0
73
Member Avatar for strRusty_gal

Hi eVeryone, Please help me on below code. I don't know what's the erorr mean. Error Message *test.c: In function ‘main’: test.c:12:2: warning: passing argument 2 of ‘tokenise’ from incompatible pointer type [enabled by default] test.c:5:6: note: expected ‘char **’ but argument is of type ‘char * (*)[100]’ test.c: In …

Member Avatar for strRusty_gal
0
293
Member Avatar for sing1006

#include <stdio.h> #include <stdlib.h> double average(int arrx[6], int *ptr); int main(void){ int arry[6]= {2,5,4,5,6,7}; int count=0; double avg; avg=average(arry,&count); printf("The average is %.2f\n",avg); printf("Number bigger than average is %i", count); return 0; } double average(int arrx[6], int *ptr){ int c=0; int sum=0; double a=0; for(c=0;c<6;c++){ sum=(double)sum+arrx[c]; } a=sum/6; for(c=0;c<6;c++){ if(arrx[c]>a){ …

Member Avatar for Moschops
0
185
Member Avatar for smdjilani

I hava a look at many header files they have codes like #ifndef and #endif what does they explain,please.

Member Avatar for rubberman
0
135
Member Avatar for Nautanki18

I have the function with following signature: void svdcmp(double **a, int m, int n, double w[ ], double **v) and variable "b" of the type double b[2][2]; When i am calling the above sub-function with command svdcmp(b, 2, 2, NULL, NULL); Dev C gives me the following warning: [warning] passing …

Member Avatar for Ancient Dragon
0
40

The End.