15,552 Topics

Member Avatar for
Member Avatar for finders

I'm working on a rolling dice program. The rules are below. I'm not sure how to **reassign** a value. For example, a value of 1 and 2, would equal 1; a value of 3 and 4, would equal 2; and a value of 5 and 6, would equal 3. The …

Member Avatar for Hiroshe
0
137
Member Avatar for Jonathan_5

#include <stdio.h> void function1(void); void main () function1(); } void function1(void) { int a; int b; int c; int d; int i=0; int rooms; printf("enter number of rooms\n"); scanf("%d",&rooms); do { printf("Enter the price per meter of the tiles\n"); scanf("%d",&a); printf("Enter the length\n"); scanf("%d",&b); printf("Enter the breath\n"); scanf("%d",&c); printf("Enter the …

Member Avatar for Hiroshe
0
99
Member Avatar for eldesperado

#include <stdio.h> #include <stdlib.h> #include <string.h> FILE *data; struct node* L = NULL; struct nodeMail* M = NULL; struct nodeNr* N = NULL; struct nodeMail { char email[20]; nodeMail* next; }; struct nodeNr { char numri[10]; nodeNr* next; }; struct node { char emri[10], mbiemri[10]; nodeMail* email=NULL; nodeNr* numri=NULL; int …

Member Avatar for GiantBy
0
188
Member Avatar for 영휘

#include <stdio.h> void Merge(int *, int, int, int); void MergeSort(int *array, int left, int right) { int mid = (left + right) / 2; if (left < right) { MergeSort(array, left, mid); MergeSort(array, mid + 1, right); Merge(array, left, mid, right); } } void Merge(int *array, int left, int mid, …

0
85
Member Avatar for john_hasan

Friends i have little bit problem in making a c language program. I have to make a program which prints prime numbers from 1 to 500. I make this program but with while loop then i was told to make it using for loop, which i tried but failed. So …

Member Avatar for aizam76
-1
3K
Member Avatar for boka123

The program should insert a node that is a sum of next 2 nodes stdin: 2->7->4->9; stdout: 2->11->7->13->4->9; The program returns a segmentation fault,I'm not sure what seems to be the problem. void insert(Node * list){ if (list==NULL) { return; } for(; (list->next->next)!=NULL ; list=list->next){ Node* new=(Node*)malloc(sizeof(Node)); if(new == NULL) …

Member Avatar for Akash_Soni
0
171
Member Avatar for Jean-Luc

Is it possible to dynamically use scanf to prompt for user input ? I have the code shown below scanf("%d %d %d %d", &myarray[row][0], &myarray[row][1], &myarray[row][2], &myarray[row][3]) which works fine when the number of columns is fixed but in my case it is not !

Member Avatar for Akash_Soni
0
334
Member Avatar for Cool_Omar

This Project is to implement some procedures doing the following: 1. Represent any graph using these input parameters: • A parameter to represent the graph by Adjacency Matrix, or Adjacency List. • A parameter to indicate whether the graph is directed, or undirected. • A parameter to indicate whether the …

0
195
Member Avatar for nahashon

how can you write a program that returns the last integer of the inputted number from the keyboard by the user using recursion?

Member Avatar for David W
0
175
Member Avatar for XodoX

I have a small code utilizing a hash table. Now I want to convert it, basically, to a distributed hash table. Hoever, I can not find out how you actually code one or what changes you make to an existing hash table...??? Can anyone please help me, please? I can …

Member Avatar for L7Sqr
0
173
Member Avatar for Ghost0s

Hi i'm a newbie here & my questions are : 0- *what should i know to develop a library like the C standard library and if im thinking of building my own OS "im just dreaming" should i create a NEw C for it cause as we know C for …

Member Avatar for Ghost0s
0
317
Member Avatar for Stefan_2

Okay. This weeks 'problem' is that I need to simulate a game. I have to make two singly linked lists which will contain a name of player, his attack (double/float) number and his defence number and so on for as many players as the user inputs. The point of the …

Member Avatar for Stefan_2
0
323
Member Avatar for Ace7z

This is my function UpdateWord. It searches for a word in the file and updates the word or the meaning void UpdateWord(void) { char srchWrd[30],choice,qtn='Y'; int x,y; dictio a, temp; FILE*ptr; do { printf("\nEnter Word to update: "); fflush(stdin); gets(srchWrd); x=strlen(srchWrd); for(y=0;y<x;y++) srchWrd[x] = tolower(srchWrd[x]); if((srchWrd[0]>='a')&&(srchWrd[0]<='i')) ptr=fopen("A-I.dat","r+b"); else if((srchWrd[0]>'i')&&(srchWrd[0]<'s')) ptr=fopen("J-R.dat","r+b"); …

Member Avatar for Ancient Dragon
0
175
Member Avatar for prerit

Hello all!Im trying to write a program that accepts a string from users and then converts each character in the string to its corresponding 8-bit binary code and store it for further manipulation on obtained bit. I have the following code but it is not executing as expected : #include …

Member Avatar for deceptikon
0
328
Member Avatar for ballhysaledio

help with this PROGRAMM: Topic :The book of contacts Build a programm in C ,which saves in a text document the list of contacts /persons. Every contact should save an information for: 1.Name 2.Surname 3.the list of email(he can have a few addresses) 4.the list of the number of phones. …

Member Avatar for pritaeas
0
125
Member Avatar for XodoX

It's a server-client code. The client should wait for the server, and if there's no response, then send a new request. There's a 2 second wait. It's UNIX. I've been looking at some select() examples, but I'm not really sure... I found this example. #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> …

Member Avatar for iamthwee
0
160
Member Avatar for cambalinho

when we create child controls, what is the style for accept text formats? (i mean: '\t', '\n' and others)

Member Avatar for cambalinho
0
132
Member Avatar for nickliutw

I'm currently writing a program that can track each word appear in a paragraph. For example, if a paragraph is "I have two dogs and two cats......" my program output should be: 'I'appeared 1 time, 'have' appeared 1 time, 'two' appear 2 times ....so on So far, I have two …

Member Avatar for iamthwee
0
154
Member Avatar for mizShaid

how to program that allow user to search, delete existing data, insert new data, sort the data and display the data

Member Avatar for Moschops
0
58
Member Avatar for Fatma_2
Member Avatar for ram619

What is the maximum buffer size allowed in memecpy() function in c, I am using GCC compiler,32-bit system, What is the affecting factor for memcpy failure? ->Alignment issue? ->Size? however the buffer size 256bytes not working, tried 160 bytes copy which fits our requirement

Member Avatar for ram619
0
3K
Member Avatar for Stefan_2

I get this error poping up here and there but I still don't know what it means and how to fix it. "Windows has triggered a breakpoint in program_name.exe. This may be due to a corruption of the heap, which indicates a bug in program_name.exe or any of the DLLs …

Member Avatar for Ancient Dragon
0
221
Member Avatar for cambalinho

when i use the ownerdraw message, with button(for exemple), do i lose the button face or only the text? (i need show a text and image, without lose the button face)

0
68
Member Avatar for gwmang0k

hello, i am really new in C programming. This is regarding switch case. How do i limit user input in switch cases? In this case, after they input 1 or 2, i dont want them to input any other number other than 0. Im still new in loop so any …

Member Avatar for Angus_1
0
535
Member Avatar for XodoX

If I want to have a datagram socket, what do I have to change here ? It's a stream socket right now. Just change it where it creates the socket ? `sockfd = socket(PF_INET,SOCK_STREAM,0);`

Member Avatar for Hiroshe
0
194
Member Avatar for DkgMarine

So i just finished my first c course, so what comes after? like i learnt how to sort arrays, import from files and change them, linked list and stacks and queues, so thats it? can't wait for the new semster to learn more, i just wanted a heads up to …

Member Avatar for Hiroshe
0
158
Member Avatar for almando

i want a program code that convert the decimal to binary numbers and vise versa, and a GUI that contain my name which is: "Hafenaaje" and my student number="120012189. the gui may contain clear, decimal, binary and exit button... please help!!!!

Member Avatar for rubberman
-1
131
Member Avatar for sankubha

Am developing a c programming which contains windows.h header file and GetWindowText api functions.Now i want to run it in linux.Is there is any api in linux or is there is any possiblity to run the c programming on linux.

Member Avatar for Ancient Dragon
0
456
Member Avatar for senait.kifle.127

Hello everyone, I was given this assignment, but I am stuck. Your help is appreciated :) 1.Ask for a desired accuracy epsilon for the to approximate value of \pi. 2. Use the Leibniz series to approximate pi. 3.Check after each iteration step wether the value of the last summand | …

Member Avatar for cgeier
0
4K
Member Avatar for pspwxp fan

Hi, My task is to create a library/precompiled header for use with MASM. I am using Code:Blocks. I have googled quite a bit and haven't come up with an appropriate solution. I was hoping someone could point me in the right direction. This is what i have done so far: …

Member Avatar for Ancient Dragon
0
2K

The End.