15,552 Topics

Member Avatar for
Member Avatar for charchar88

I usually program in java but I'm going to implement this in C but the general logic psuedo code should work I would think. these numbers represent these characters: 2-abc 3-def 4-ghi 5-jkl 6-mno 7pqrs 8-tuv 9-wxyz If I were to type in a 7 digit number say 233-7687 as …

Member Avatar for abhimanipal
0
206
Member Avatar for efronefron

I dont have any idea what the problem is. But what I know is it stopped at fgets(temp, 256, stdin); when I run the program, it runs this line and then just stopped because of a segmentation fault. The silly printfs are just for me checking where it stopped exactly. …

Member Avatar for efronefron
0
127
Member Avatar for leftovas17

Yes, I have looked in the forums for answers and have found plenty, and am asking about what I could not find. And yes, this is homework, but I need help and my professor has not responded thus far... now on to business. Description of Goal: Make a Set Data …

Member Avatar for leftovas17
0
492
Member Avatar for slygoth

Im writing a code to generate invoice numbers. Im using a file now that increment to number each time but i was just wondering if there is a way to use time so that it can generate a invoice using time or date. Like the first 4 digit would give …

Member Avatar for fpsasm
0
167
Member Avatar for maxxjr

I need to treat a 1D-RAM buffer as a 2D array of a different type than what was declared, and have questions on different methods and what provides best performance. Questions: 1. How to set things up so I can access an element by something like "ptr[x][y]"? 2. Would any …

Member Avatar for gerard4143
0
209
Member Avatar for cse.avinash

Sir, here is the qustion:- Nestor was doing the work of his math class about three days but he is tired of make operations a lot and he should deliver his task tomorrow. His math’s teacher gives two numbers a and b. The problem consist in find the last digit …

Member Avatar for mitrmkar
0
1K
Member Avatar for nayefc

Hello Everyone, I am trying to emulate a T9 (cellphone) keyboard in C. So lets say a user types in the numbers "23", a possible word combination would be "be". In my question here, I will only write down a part of what I have assuming it only works for …

Member Avatar for L7Sqr
0
207
Member Avatar for sirpampos

I have an assignment until next week and i don't know hot to complete it In the program in c we have to help a cat escape from a dog which has double speed. The program works as follows : the data of the program are read from the file …

Member Avatar for sirpampos
0
115
Member Avatar for d_panayotov

Hi, I tried searching but I don't know how exactly to describe my question in 2-3 words so I didn't find anything. Is it possible to do something like this?Just to get the idea... I know it doesn't work: [CODE]switch(c){ case '1':{ (...) ; break;} case '2':{ (...) ; break;} …

Member Avatar for L7Sqr
0
127
Member Avatar for itslucky

Hi Friends, How can I create a number which will be construct with the array values. e.g. [CODE] arr[0]=2 arr[1]=5 arr[2]=8 arr[3]=4 [/CODE] now the number will be, [CODE]int num=2584[/CODE] please help me for this... Thanx...!!!

Member Avatar for Arbus
0
131
Member Avatar for d_panayotov

Hello, I have this assignment in C. The problem is that the functions have to be placed in separate files instead of just one. I haven't done that before. It seems code that would have run if the program was written in one file doesn't work when the functions are …

Member Avatar for d_panayotov
0
169
Member Avatar for Asif_NSU

Gaussian elimination is designed to solve systems of linear algebraic equations, [A][X] = [B] This program reads input from a file which is passed as an argument when calling the program. Say the matrix is in file name matrix.txt so we call the program in this way: ------------------------- gauss matrix.txt …

Member Avatar for xNourax
0
1K
Member Avatar for Zababa

Hello guys! :) I just wanted to ask something so that I can clear up things in my mind. What is the difference among Carriage Return ('\r'), New Line ('\n') and Line Feed? Is it correct to say that \n = \r + LF ? Thank you in advance! :)

Member Avatar for Zababa
0
174
Member Avatar for fab2

[ICODE] Hi, here you will find a program which taking some inputs calculates the sales of 5 items on daily and weekly basis. Prevously I wrote it with no function, and it was quite a very long program, 9 A4 sheets, but this is written by using a function. As …

Member Avatar for rubberman
0
208
Member Avatar for gruffy321

[CODE]#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { char _name[30]; int _age; printf("Hello Quester\n"); printf("What is your name ?\n"); scanf(_name); printf("...and what is your age, may i enquire esquire of peril and danger ahead\n"); scanf (_age); printf ("\nYour name is ",_name, (" \nand your age is "), _age ); …

Member Avatar for gruffy321
0
209
Member Avatar for virtue

Hi, I wrote a program that inserts nodes into a linked list in descending order.But whenever I test my code with numbers 12,14,13,19,7 in this order.Whenever I entered 7 I took 7 is already in the list.But as easily seen 7 is not in the list before I inserted.After give …

Member Avatar for sourabh17
0
134
Member Avatar for SwethaSuresh

Can anyone please solve the following problems in C ASAP its verymuch urgent 1. C program to check whether the given graph is tree. 2. C program to check whether the Binary tree is full or complete or neither full nor complete 3. C program to extract spanning tree(without using …

Member Avatar for yan0
0
97
Member Avatar for volkang

just a simple for loop from 2 to 4(including for with increments 0.1 and 0.01. the problem is that when the increment is 0.1, the value of cur in last loop is 3.9; wheras, when increment=0.01 it is 4(as expected). all the variables are "double". any idea or suggestion? [CODE] …

Member Avatar for volkang
0
85
Member Avatar for peck3277

Hi guys, Could anyone show me the best way to run a function every 10 minutes for ever? Thanks guys!

Member Avatar for darkbreaker
0
72
Member Avatar for hansel13

[B]The Producer Thread[/B] What does a producer thread write to the buffer? Create 20 different files (named in0.txt, in1.txt, ... in19.txt). [Testing Hint: you want to be able to tell from the text which file it is from, so the contents should be aaaaaa or bbbbbbb etc..] Vary the length …

Member Avatar for funter
0
2K
Member Avatar for Enzo85

Hello everyone I am new to this site. I have a university assignment in which I need to program a 2 player pacman game, using C and the Unix operating system. If more than 2 users have typed the command to run the program/s the users must wait in FIFO …

0
126
Member Avatar for wdearth

I'm supposed to make a program using getchar() to input the operation entered, then return the result of the operation after extracting the operands and the operator and calculating the result. if you enter 15 + 30 the result should be 45 or 15+30=45 Also using user-defined functions to do …

Member Avatar for thekashyap
0
115
Member Avatar for m1n1m3

Hi I have a structure of members uint x,uint y (name is "ruudud") declared as global variable. Iv declared structure and pointer to structure globally in following way: [ICODE]struct ruudud{ unsigned int x: 6; // 64 max unsigned int y: 6; }; struct ruudud *r_ptr;[/ICODE] Iv allocated memory in following …

Member Avatar for gerard4143
0
228
Member Avatar for moroccanplaya

i just want to know if there is any good example tutorials using http post and put requests ?

Member Avatar for pseudorandom21
0
47
Member Avatar for newbie_in_c

Hello all, I've a small question. I wanna use a function void myfunction(int **array1, int **array2) where array1 and array2 shoud be [4][4]. I've added 2 arrays int myarray1[4][4], myarray2[4][4]; and called my function like this: myfunction(&myarray1[0], &myarray2[0]); I've got the following warning message : warning: passing argument 1 of …

Member Avatar for newbie_in_c
0
136
Member Avatar for Philiplee

If I have .txt file include 10 digits such as 0//start bit 1 1 0 0 0 0 1 0//parity bit 1//end bit If I put those into an array, how to check the first bit, the last bit and parity bit? How to convert the mid 7 digits in …

Member Avatar for WaltP
0
92
Member Avatar for garu525

Hello, I'm making a simple C calculator using only getchar and putchar functions, my program works only if the arithmetic is entered correctly but if it's not, I can't make the proper error checking on it if the arithmetic is enteres improperly. EXAMPLE: 4 + 7 = 11 =====> Works! …

Member Avatar for WaltP
0
714
Member Avatar for rockerjhr

quicksort.c [CODE]#include "quicksort.h" int compare( byte *a , byte *b ) ; void memswap( byte *s, byte *t, int count ) { byte tmp ; while (count-- > 0 ){ tmp = *s ; *s++ = *t ; *t++ = tmp ; } } byte *select_pivot(byte data[], int n , …

Member Avatar for gerard4143
0
245
Member Avatar for c_newbie1

this program i made.. should take an input 'no' from the user.. and print the following pattern.. 0 0 n+1 0 n+1 n+2 0 n+1 n+2 n+3 0 n+1 n+2 n+3 n+4 ....... n 0 n+1 n+2 n+3 n+4.. n-1 0 n+1 n+2 n+3 n+4 0 n+1 n+2 n+3 0 …

Member Avatar for thekashyap
0
241
Member Avatar for epicbeast9022

#include "includes.h" #include "constants.h" #include "functions.h" int pscore=0,cscore=0,ppaddle=185,cpaddle=185,ballSpeed = 0,cpuPadSpd = 0,frame = 0; SDL_Surface *screen=NULL,*secondary=NULL,*playerscore=NULL,*cpuscore=NULL,*cpuwin=NULL,*playerwin=NULL; bool gameEnded = false,selectedDiff=false; TTF_Font *font,*humungo; SDL_Event e; //PongBall ball; void cleanup() { SDL_Quit(); SDL_EnableUNICODE(0); exit(0); } bool init() { if (SDL_Init(SDL_INIT_EVERYTHING) == -1) return false; if (TTF_Init() == -1) return false; screen = …

Member Avatar for rubberman
0
216

The End.