15,550 Topics

Member Avatar for
Member Avatar for begueradj

hello people is anyone of you able to tell me the heuristic i can choose in order to allow my robot to move from the doo to the issue in a labyrinth ?

Member Avatar for gusano79
0
178
Member Avatar for gizmo7008

I am trying to find the longest common prefix of two words entered by the user. I don't understand what is going wrong. I keep getting this error when I compile: [CODE]prefix.c:11:13: error: expected declaration specifiers or '...' before '(' token [/CODE] And this is my code: [CODE]#include <stdio.h> #include …

Member Avatar for WaltP
0
916
Member Avatar for dvidtrnh

[CODE]void numToEnglish(unsigned int num, char english[]); main() { char* first20[] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen","nineteen"}; char* tens[] = {"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"}; printf("Enter an integer between 0 and 999: "); scanf("%s",s1); …

Member Avatar for WaltP
0
267
Member Avatar for jinna

hello every body, I am a new prog.in C.My final yr project based on incrementing ipv6 address by 1.The address format is - fe80:0000:0000:0000:0204:61ff:fe9d:ffff So the result will be - fe80:0000:0000:0000:0204:61ff:fe9e:0000 User enter the valid ipv6 address and final result will be +1 incremented.Its a incrementation of hex.value. It also …

Member Avatar for Narue
0
2K
Member Avatar for yye

Hi, I want to declare an array of constant values in my header file, and this array cannot be changed in the main code. const uchar x[4] = {1, 2, 3, 4} does not work, cos the linker will complain that the address space overflow. Is there any way to …

Member Avatar for Moschops
0
342
Member Avatar for gourav1

please tell me the answer of this question.it is irritating me a lot. i have searched many books but not getting it.please help!!

Member Avatar for gourav1
0
127
Member Avatar for YAMNA MIDHAT

Can any one please tell me that why turbo c is not supported by windows 7?:?:

Member Avatar for YAMNA MIDHAT
0
163
Member Avatar for terence193

This is the problem I have Read in 10 numbers, 10<numbers<100. As each number is read, print it only if it is not a duplicate of a number already read. I did the first part but couldn't work out the second,where the duplicate is used. I have some idea in …

Member Avatar for zeroliken
0
110
Member Avatar for rutwvu

I was asked to write a program, based on parent-child cooperation, which uses a “parallel” merge sort to a sequence of 800 numbers from a text file.I have to read the sequence of 800 integers, which I store in an array, and then pass half of them to a child, …

Member Avatar for rutwvu
0
1K
Member Avatar for auwi987

hello guys how properly push,pop,display a char array into another char array, when come to int i can do but in char array its to hard to analyze.. pls guy need some help. thnx in advance

Member Avatar for Narue
0
159
Member Avatar for mkab

Hello everyone. I am to program a simple shell in C for my project. So far my shell can execute simple commands and now I want to implement enviroment variables. I looked up on how to use the getenv, setenv, putenv. So far so good i've tried to use the …

0
156
Member Avatar for purpleturtle_97

I've been stuck on this for hours because I really don't understand file descriptors and how successfully print a file to one. Basically, I want to be able to open a file and then echo its contents a character at a time to a socket file descriptor. The code below …

Member Avatar for Narue
0
207
Member Avatar for Aman6o

On my development board, I am trying to make 8 LEDs (0 - 7) blink one by one. Here, is my code. What do I need to change to get my desired output, Please help. [CODE]int main (void) { int a,b; DDRC = 0xFF; PORTC = 0xFF; num = PORTC; …

Member Avatar for myk45
0
111
Member Avatar for mariosman

i have to create a graph by taking names of movies and the actors in that movies from a file. i have to create the graph and after i have to show the connection beteween the actors. does anyone know how i should do that in c? i prefer if …

Member Avatar for mariosman
0
113
Member Avatar for newbie14

Dear All, I have a struct as below and a pointer to the struct as such const struct pfring_pkthdr *h. I want to get all the value to be made one string delimited by comma to be inserted into db. So how to do it in C? E.g I want …

Member Avatar for newbie14
0
301
Member Avatar for randolph.gamo

hi guys i need help. In fact it's an assignment. I'm fed up with this stuff. This is my code. has got many errors. actually it's just messy. please provide me with me a code [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #define MAXWORDS 5000 /* max no of …

Member Avatar for WaltP
0
131
Member Avatar for beantine

I've been tearing my hair out over this for quite a while now. What I'm trying to do is populate the struct array from within a function but I cannot figure out how to do it. Everything I've tried throws up a syntax error. Ideally the data should be entered …

Member Avatar for WaltP
0
2K
Member Avatar for jamal30

can someone help me? i am new to C, i meed to read file which looks like this Month Date Day Activity Repetitions January 1 Monday brushed_teeth 9 January 1 Monday combed_hair 5 Then i need to do calculations in the reps and month

Member Avatar for ashlock
0
96
Member Avatar for theCompiler

i have a 6x6 array . a certain object randomly moves within the boxes , i need to count the steps he makes for him to able to step all the boxes , i dont know what to do nxt with my code . the dot represents the boxes : …

Member Avatar for WaltP
0
117
Member Avatar for peter20

Hi all, I have a problem with my code. I use in a struct variable type time_t with name tt like [CODE] typedef struct{ time_t tt; } [/CODE] then I initialise in the main function of my server [CODE] time_t timer; timer=time(NULL); [/CODE] I pass the timer in my shared …

Member Avatar for Narue
0
241
Member Avatar for Despairy

i have an assigment to fork the main program to 4 sons each will sort an array in a different way [ICODE] for (sonID=0;sonID<4;sonID++) { status=fork(); if (status<0) error("Can't Fork!"); if (status==0) { checkFiles(argc,argv,&in,&out,sonID);// opening the files for use readFromFile(&nameList,&sizeOfList,&numOfStrings,in); sortArray(numOfStrings,&nameList,sonID); outputToFile(nameList,numOfStrings,out); //output the array to out file freeArray(sizeOfList,nameList); //freeing …

Member Avatar for Despairy
0
180
Member Avatar for terence193

I am trying to create a program that creates a loop to enter different values in an array. but the program is skipping values of i. I can't understand why.. [CODE] #include<stdio.h> int main (void) { char s[10]; int i; for (i=1;i<=10;i++) { printf("enter %d'th value of the array 's'\n",i); …

Member Avatar for ashlock
0
97
Member Avatar for cka91405

Im still learning C and I have a few questions about making a array of strings. Im doing an assignment for school, and I'm a little stuck with my program. Here is my code so far: [CODE] #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]){ FILE* fin; int a; …

Member Avatar for teo236
0
379
Member Avatar for roflspanker

I have been working on this code for quite a while and have not been able to figure it out. I looked online and through the forums and could not find something that showed how to fix it. This program takes in the julian date ie. 12df234(first two # are …

Member Avatar for Adak
0
141
Member Avatar for ExpertsGuide

Hi, I have installed Turbo C compiler on windows vista (32 bit). Set the PATH variable to properly point to tcc.exe under C:\TC\BIN; I created some C files under C:\TC\myfolder I tried compiling using [CODE]C:\>cd TC\myfolder C:\TC\myfolder>tcc -P-c file.c[/CODE] Sometimes it says file not found while other times it compiles …

Member Avatar for Adak
0
931
Member Avatar for mkab

Hello everyone. I have a problem using strtok in C. I get a user input from the command line and I want to tokenize it with pipe ("|") as the delimeter and put the result in a double pointer variable. Here's my code: [CODE]char** argv; char *token; token = strtok(userInput, …

Member Avatar for mkab
0
2K
Member Avatar for FinaL111

Hello I have a question regarding linked list: The assignment I was given was rather large so I'm not going to go into the full details of what exactly it does and give you just what is needed to answer the question. First we have a student records structure [CODE]typedef …

Member Avatar for ashlock
0
110
Member Avatar for robinpurbia

[CODE]#include<conio.h> #include<string.h> //prototype declaration int pnc1(FILE *fp); int pnc2(FILE *fp); int findstr(char *p[], char *name); int sum_array(int a[][], int element); //function to pick data and then convert bits to number // for notes_disp , notes_req int pnc1(FILE *fp) { int tot=i=j=k=0; i=getw(fp); j=getw(fp); k=getw(fp); tot=(100 * i) + (10 * …

Member Avatar for zeroliken
-1
108
Member Avatar for BITnur

Im doing my project on number conversion. I found the coding below. can anyone help me to explain the coding. why the coding have "count"? why the "count + 1"? what function of "count"? [CODE]void Bin2Dec() { long int a[20],i,n,count=0,b[20],c[20],sum=0; printf("\n Enter a binary number to convert to decimal form:"); …

Member Avatar for BITnur
0
233
Member Avatar for engineer61

Hi friends I need urgent help. now three variables we printed to a file received from the user. This variable to another file, the user wants to take that file and the value of the variable is a variable, you need to do. And this event is the first change …

Member Avatar for zeroliken
0
136

The End.