15,552 Topics

Member Avatar for
Member Avatar for lionaneesh

Sir/Maam, please suggest me some very simple tutorials explaning right from the basics of such functions . I am doing C since 6 months and was looking at a tutorial of BEEJ's guide to network programming.. there at looking at a source code i found these functions and am really …

Member Avatar for UncleLeroy
0
108
Member Avatar for rai32

Hello people, i am really sorry to post two new threads in such a short time, but i have a problem that's driving me nuts. I think i know where my program fails, but i don't know the reason why. Let me explain: I am making a chat program. I …

Member Avatar for rai32
0
148
Member Avatar for habib_parisa

Dear All, I am trying to use free function in C to free memory of an array of pointers. It does not work and I get segmentation fault. The code looks like this: [CODE] #include <stdio.h> #include <stdlib.h> int main() { int *make_pointer(int); void read_array(int *array[3]); /****************/ int *array[3] ; …

Member Avatar for jephthah
0
6K
Member Avatar for Eternal49

Ok, I dont really know how to explain what im trying to do. So it might be easier to just look at my code. But basically im getting the following error messages when I try to compile the code, I know what error messages mean, I just dont know how …

Member Avatar for abhimanipal
0
192
Member Avatar for SpyrosMet

hello forum I need help in making a function that randomly chooses between two numbers that I give through the parameters. Please give me a hint or something. Thanks in advance guys.

Member Avatar for Narue
0
527
Member Avatar for Carter12

Hello, I need some advice from some of the more expert programmers on what path should I take further in my learning process. I started with PHP and now I can say I do ok, not an expert of course. I like programming very much and I love PHP, it's …

Member Avatar for omol
0
255
Member Avatar for Xufyan

find the max value in an array ? can anyone tell me whats wrong with this program ? i've just learned what are arrays so don't know much about it, i want to write a program that prints the max value inside an array. i wrote this: [CODE]int main(void) { …

Member Avatar for MageBane
0
244
Member Avatar for ams_chelseafc

I have written the following Code which will convert an integer number to a roman..I have a array list of integer number which I pass through a for loop and the return value is individual converted Roman character.. My Issue is when the converted value is returned from the function …

Member Avatar for jephthah
0
808
Member Avatar for ContactaCall

Hello. I'm currently developing an IVR system under Asterisk through the Asterisk Gateway Interface (AGI), connecting to a Mysql server using the Mysql C API. The server returns a ticket number that I have to say to the client, so I developed a TTS (Text To Speech) algorithm to say …

Member Avatar for saurabhjasuja
1
340
Member Avatar for noobuser

Hi, can anyone help me with this program. the program inputs a string and replace the first char with the second one. [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #define MAX 200 int main(void) { char myString[MAX]; char getCh; char setCh; int i = 0; printf("Please enter the string: "); gets(myString); …

Member Avatar for noobuser
0
174
Member Avatar for speedy94519

Hey guys im having trouble writing this code for my function. I have the idea down and a way to solve the problem but im having trouble writing it in C code. Basically im writing a function that runs exactly like the function strcat from the string.h library but we …

Member Avatar for anonymous alias
0
359
Member Avatar for sourabhtripathi

[CODE]#include<stdio.h> #include<conio.h> int main() { int dec,rem,ans=0; printf("Enter the Decimal number\n"); scanf("%d",&dec); while(dec>=2) { rem=dec%2; dec=dec/2; if(rem==0) ans=ans*10; else ans=(ans*10)+1; } printf(" binary number is"); while(ans>0) { rem=ans%10; ans=ans/10; printf("%d",rem); } getch(); return 0; } [/CODE] this code is not working properly for example for 10 it gives 01, should …

Member Avatar for abhimanipal
0
157
Member Avatar for coolguy_003

Hi, I did the stack implementation using arrays and i would like to do it with function pointers but i have no idea. If anyone could help by illustration that would be great as function pointers is pretty difficult for me! Thanks in advance. coolguy

Member Avatar for anonymous alias
0
265
Member Avatar for rai32

Hello again guys, this is the code: [code] struct nodo { char *nom_usuario; //*user_name struct sockaddr_in IP; struct nodo *siguiente; //*next }; struct lista { //list struct nodo *primero; //*first struct nodo *ultimo; //*last }; ... ... ... void ordenar(struct lista* maestra); void ordenar(struct lista* maestra){ struct nodo* aux; struct …

Member Avatar for abhimanipal
0
117
Member Avatar for Graphix

Hey everybody, I currently making a program that needs to activated on startup. So after extensive googling I decided to do it the registry way. However, creating a new value or editing an existing value, is not working. Could you explain how to edit and/or create a value in a …

Member Avatar for Graphix
0
274
Member Avatar for boiishuvo

Hello, I am only starting to design a C program that opens a file; [code] #include <stdio.h> #include <string.h> #include <stdlib.h> int main(void) { FILE *fp; fp = fopen ("file.txt", "r"); if (fp == NULL) { perror("Can't open the file"); return EXIT_FAILURE; } printf ("%d\n", fp); system("pause"); return EXIT_SUCCESS; } …

Member Avatar for abhimanipal
0
2K
Member Avatar for llemes4011

Hello, I was wondering if anyone knew anything about programming Microcontrollers with C, and if so what controllers are best/have the most room for the least cost/ easy to get the code on. I know nothing about what's needed to get it up and running, or even what to buy! …

Member Avatar for llemes4011
0
115
Member Avatar for lvhvaraprasad

hi i need code for brute force Boolean satisfyability program. plz help me i need it asap thank u

Member Avatar for 0x69
-7
176
Member Avatar for Iam3R

hi, how the below code is generating out put as " -1 < ( unsigned char ) 1 ". i read in many books saying when we do operation with singed and unsigned value always the resultant will be data type that has more width . i understand that -1 …

Member Avatar for Iam3R
0
119
Member Avatar for muthu.job2009

hi guys can any one work out a program for stack in c..for push and pop asap

Member Avatar for MageBane
-2
68
Member Avatar for jsphb9000

I am having trouble compiling this program. If somebody could take a look and see if my code is sound or not i would much appreciate it. I am worried that my logic and commands might be flawed, if someone could help me out I would much appreciate it. I …

Member Avatar for Aia
0
303
Member Avatar for chrisfrmatl

I am writing a program to print filenames in the current directory and print the time stamps next to them. I am loading the names into an array and then passing them to a function to print the stat and filenames. Here is the code. [CODE]#include <stdio.h> /* For printf, …

Member Avatar for Salem
0
394
Member Avatar for thomasekugm

I am trying to get a small piece of a program i am writing to receive a simple math expression, with two int variables and 1 char for the operator, and then i will work it with an if(){}if else statement. I just don't know how to separate the string …

Member Avatar for thomasekugm
0
162
Member Avatar for ShortYute

[B]Modified mostly from dileepkumar235's [URL="http://www.daniweb.com/code/snippet217246.html"]Login functionality in C-language[/URL] [/B] Inspiration from Narue and my previous post ([URL="http://www.daniweb.com/forums/thread249149.html"]Limit buffer Input[/URL] ) This allows you to prevents the user from entering past the array limit (SizeOfArray) if the user enters more the curser will just automatically backspace by 1 for eg (max …

0
203
Member Avatar for johndoe444

[CODE]for (i = 0;i < e;i++) { // take the excuse scanf(" %[^\n]", excuses[i]); excuse_count[i] = 0; while (sscanf(excuses[i], " %[a-zA-z]", word) != EOF) } [/CODE] The input was My dog ate my homework but at the while loop word is getting the word "My" in each loop. In case …

Member Avatar for johndoe444
0
561
Member Avatar for lionaneesh

[B]Introduction[/B] Hey! Guyz.. Welcome to my very short tutorial explaining basic uses of "malloc" function in C language. [NOTE : You need simple understanding about pointers to understand this tutorial] Hey guyz see by reading this tutorial you'll not be a malloc expert .. This tutorial is only for the …

Member Avatar for lionaneesh
-1
394
Member Avatar for rahulr
Member Avatar for jephthah
0
103
Member Avatar for twampdawg

Alright Guys & Gals I have a stupid question. I've been in IT for 7 or 8 years working up to a network administrator. I'm thinking of making a slight change and moving towards programming. I've had little to no experience in programming so far. Basically I'd like to get …

Member Avatar for jephthah
0
138
Member Avatar for ahmedga

How can insert and delete single linked lists to and/or from middle (any where except at the first and at the last?

Member Avatar for jephthah
-5
77
Member Avatar for Eternal49

Ok, Let me start off and say Im new to C. Im writting a subnet calculator, in my main function I am asking the user for a subnet mask and storing it in a char variable. Im then passing the variable to another function called "truncat", where I strip the …

Member Avatar for Eternal49
0
121

The End.