15,550 Topics

Member Avatar for
Member Avatar for basakua

sand watch (for height 4 : 4 lines in the upper half and 4 lines in the lower): INPUT: 4 OUTPUT: ******* ***** *** * * *** ***** ******* i am not sure how to form a shape like this with C. can you help me?

Member Avatar for gerard4143
0
101
Member Avatar for grimbaum

Hello all! I´m doing the n-queens prolbem in an recursive manner with a twist. The twist i the possibility to chose to place 2-8 queens in a 8x8 board.I have problem with storing the rows properly and print them at the right time inside the recursion,please feel free to give …

Member Avatar for hunter666
0
152
Member Avatar for Nogat21

Hello, i'm building a client-server application using sockets in C. I'm trying to send a structure through a socket, but the values after "deserialization" (the use of htonl-ntohl) come adulterated and i dont know why. Maybe you could help me? Here is the code: Server.c [code=c] #include <stdlib.h> #include <string.h> …

Member Avatar for gerard4143
0
203
Member Avatar for Vita1ity

I'm attempting to write a simple program which will sort a list of ten integers into descending numerical order for Second Life. I've no idea how to do this, or if its even possible, but if so it would greatly benefit the object I'm working on in game. Any help …

Member Avatar for Ancient Dragon
0
38
Member Avatar for javaStud

Hi. I am having some problems with files. I am trying to read some contents from a file, transfer them to an array and then read the contents of the array. The problem that I am facing is that the output is not that is suppose to be. The file …

Member Avatar for javaStud
0
89
Member Avatar for rehaam

Hi I need help;; Write a program to simulate a demand paging system. The program should implement the FIFO and LRU page replacement algorithms presented in Chapter 10 of the textbook. Your program input should include: The name of the page replacement algorithm. Information about the number of physical page …

Member Avatar for gerard4143
0
2K
Member Avatar for evolution120

Hi there, im new to c programming, just wanted to know is it possible to do a simple if else for 1 username login for C programming? thanks. and also, what does c2065 undeclared identifier means? how to fix it?

Member Avatar for mrnutty
0
71
Member Avatar for fradiavolo

Hello, below is my polynomial code. I had to add and multiply 2 polynomials. 1) All i have to do more is to sort decreasingly the adding() and product() functions. Eg: 4x^6 + 6x^4 + 2x^2... etc. 2) Second, to add the coefficient with the similar exponents, same in the …

0
71
Member Avatar for YoTaMiX

Hello to you all , I am required to write a program which gets a Math Expression (without checking it is good) and put in Stack only the Brackets . Implementation of Stack is One-Way Linked List Only. Examples for Good/Bad Expressions : (a*{b+c}-4/x +[e-5]) - GOOD (5+} - BAD …

Member Avatar for Berkut
0
278
Member Avatar for Placinta

Hi. I have this part of code. [CODE] int main() { int **table = NULL; allocated_matrix(table, 3, 3); //next instructions } void allocate_matrix((what_type_here)table, int rows, int columns) { table = (int **) malloc(rows * sizeof(int *)); for (int i = 0; i < rows; i++) { table[i] = (int *) …

Member Avatar for Placinta
0
135
Member Avatar for azra36

in this code i check if i'm getting data blocks in order, if not inorder i return NULL,i.e ask for next block, if in order i write the contents of data block to a file pointed by fpdddb. the contents of DDB_Parser.BlockDataByte array keep changing every time. what is the …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for revenge2

Hello there, I am having trouble copying text into a string, what am i doing wrong? [CODE=c] #include <stdio.h> int main() { char instructions[80]; FILE *f; f=fopen("a3.txt","r"); while (fscanf(f,"%s",instructions != EOF){ fscanf(f,"%s",instructions); } printf("%s",instructions); } [/CODE] the contents of a3.txt are B404 239A 2412 5345 350C C000.

Member Avatar for fjallstorm
0
104
Member Avatar for rt.arti

Hello, I am trying to generate multiple files out of a single text file by changing one parameter. My text file is of the form -- p 3 6 [COLOR="Red"]n 1 1 n 3 -1[/COLOR] a 1 2 0.8 a 1 3 0.7 e 1 2 1 2 0.7 e …

Member Avatar for nezachem
0
99
Member Avatar for Mattpd

My attempt of a "bubble sort" only partially works. Say for example if this is my structure declaration: [code] struct part { char name [NAME_LEN+1]; char owner [OWNER_LEN+1]; char status [STATUS_LEN+1]; char date [DATE_LEN+1]; char renter [RENTER_LEN+1]; } parts [MAX_PARTS], temp [1]; [/code] and the following code print: Piston:Mike:In:: Hook:Mark:In:: …

Member Avatar for Mattpd
0
160
Member Avatar for naej

help! does anyone know how to make a snake game? using turbo c as a programming language using, if, if-else, if-else-if,for loop,while , do-while, array,and modular and nested if,if-else, if-else-if,for loop,while , do-while, array, thank you so much i really need it it's urgent dankey!

Member Avatar for mrnutty
-1
67
Member Avatar for raghuhr84

Hi All, I am facing the scanf() function problem, below given is a small code snippet where am facing the problem. [CODE] int main() { char str1[100]; char str2[100]; printf("Enter 1st string\n"); scanf("%[^\n]s",&str1); printf("Enter 2nd string\n"); scanf("%[^\n]s",&str2); printf("1st string is %s\n", str1); printf("2nd string is %s\n", str2); return 0; }[/CODE] …

Member Avatar for Dave Sinkula
1
680
Member Avatar for kingster113

[CODE]#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <conio.h> // Function prototypes void MainMenu(); void PaymentMode(); void get_password(); #define FIELD_SIZE 25 #define length(array) ( sizeof (array) / sizeof (array)[i] ) struct account { char *id; char *password; }; static struct account accounts[] = { { "alexander", "iamsolame" }, { …

Member Avatar for kingster113
0
315
Member Avatar for Vita1ity

Hey everyone, I've written a program for class but am not sure what the values of a and b are after the code fragment is executed. Anyone that can help me out? [code] int a = 16; int b = 45; bob (a, &b); void bob(int x; int *py) { …

Member Avatar for Aia
0
39
Member Avatar for ayan2587

hi frndz.... i was wondering that given 1<n<1000000 & 1<r<1000000 how do i [B][I]efficiently[/I][/B] find nCr (combination) for any given values of n & r. please help with an efficient algorithm...

Member Avatar for ayan2587
0
87
Member Avatar for pmee

Hi, I'm trying to figure out how to convert a hex number (that I read in from a file) to an 8 bit binary number. At the minute I'm converting the number from Hex to decimal to binary (which probably isn't the best way). The only problem I have with …

Member Avatar for iAmLast
0
965
Member Avatar for dewdropz

//ok i need to write a programme that asks the user to input student numbers as an array and check the initial number and allocate them into different classrooms.. my code looks lik ths: [CODE] #include <stdio.h> int number; int i; int student_number[10]; int total; int first[0]; int main (void) …

Member Avatar for jonsca
0
97
Member Avatar for maharjanmike

so far i was able to do for countting the letters in a phrase ..,but i am not able to count the words in a phrase and displaying according to the number of the word...here's my code to count the letters.. what changes should i make to count the words …

Member Avatar for maharjanmike
-2
102
Member Avatar for lisedaton

H ALL!! IT CAN BE SAID IM DONE WITH THIS PROGRAM THAT ITS MAKING ME CRAZY... BUT IM HAVING A PROBLEM... (I PAINT THEM RED AND WROTE THE PROBLEM BESIDE IT...) PLEASE PLEASE HELP!!!!!!!!!!!!!!!!!!!!!! THE PROGRAM IS SUPOSSE TO RECIEVE A SENTENCE AND THEN SPLIT IT TO WORDS AND COMPARE …

0
77
Member Avatar for 0xCoTiNe

I wrote a code which a crossword and a word are inputed and the cord of the beginning of the word are printed out and I keep getting the "Run-Time Check Failure #2" error at the very end. [CODE]#include <stdio.h> #include <string.h> int BottomBorCheck(int index); int TopBorCheck(int index); int main() …

0
56
Member Avatar for adudefelldown

Hi, in standard C, I'm trying to use my redblack tree code along with other data structures for my project. I currently have everything working (as far as I can test atleast) except the red-black tree. The red-black tree is in its own file redblacktree.c and main is in its …

Member Avatar for phpbeginners
0
122
Member Avatar for tien113

hi u I have a project combine a raytrace with SDL library but I dont know how to do... can you help me??? this is all source code of my raytrace: [CODE]http://tinypaste.com/6247b[/CODE] and SDL library on the internet: [CODE]http://www.libsdl.org/[/CODE] thanks...

Member Avatar for tien113
0
76
Member Avatar for jitu44

How can find the repitition of a number from a given array with less time complexity(<N)?

Member Avatar for mrnutty
0
74
Member Avatar for Iam3R

Hi, i dont understand the following; PLZ fix me. when i try to change the character pointed by pointer the behaviour is undefined. but when i change the same by using pointer as formal parameter of function it will be ok. why i cant change the base address of array, …

Member Avatar for Iam3R
0
121
Member Avatar for Spreegem

So I have to make a greedy algorithm to find the fewest number of coins needed to make change for any n cents. I have an infinite number of quarters(25 cents), dimes (10 cents), nickles (5 cents), and pennies (1 cent). This is the algorithm I came up with, it …

0
51
Member Avatar for haiconsoba

Tilox game.I have to write the programe of game plan.I need help about idea.(Graphic use GDI)

Member Avatar for William Hemsworth
0
54

The End.