15,552 Topics
| |
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 … | |
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 … | |
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] ; … | |
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 … | |
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. | |
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 … | |
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) { … | |
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 … | |
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 … | |
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); … | |
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 … | |
[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 … | |
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 | |
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 … | |
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 … | |
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; } … | |
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! … | |
hi i need code for brute force Boolean satisfyability program. plz help me i need it asap thank u | |
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 … | |
hi guys can any one work out a program for stack in c..for push and pop asap | |
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 … | |
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, … | |
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 … | |
[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 … | |
[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 … | |
[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 … | |
| |
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 … | |
How can insert and delete single linked lists to and/or from middle (any where except at the first and at the last? | |
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 … |
The End.