15,552 Topics
| |
| Hello, I'm working on a project in C to practice before I take a class this fall that requires C. I decided on making a task list. First, I'm starting with a cli interface, and then I hope to move it to GTK+ since that would look better and I … |
Hi all! Please give c code which finds the included header files of another c file | |
[B][COLOR="Green"]How to convert a three dimensional string array into integer?[/COLOR][/B] | |
Ok I have a linked list which have to read from binary file and to write in binary files. This is the function about the reading from keyboard: [CODE]short readElement( Node * newE) { int b,e,m; if ( newE == NULL ) return 1; do { printf("\n Registration number:"); scanf("%s", … | |
Q1: design a system that will read students information, display them in a table form, and implement some operation on them. The system must show the following: ========================================================================= Do you want to add new students? Do you want to display the student information? Calculate the average of the final marks … | |
Write a C program to find all real roots of a polynomial equation of degree n using Bisection method. Note that you can’t define the function as macro or C-function inside your program file. You have to take the polynomial function and degree from user. Also you can’t define the … | |
#include <stdio.h> void main() { printf("hi"); } ..................... #include <stdio.h> int main ( void) { printf("hi"); return 0; } .............. q1: What is the diff in two codes? q2: I am habitual of using code type 1 ( the first code), is it ok to follow that way? | |
write a problem that take 10 integers from the user put in a table then calculate the min,max and the average and print it on the screen | |
Hi! The following program gives the integer value of char string as output.Suppose if we give "1998",it will give integer 1998.In [CODE]i=i<<3+i<<1+(*string-'0')[/CODE]I understood that it will multiply i by 10,but in *string-'0' I don't know what is going there..?.Here what refers string is it index in 1998 or whole 1998. … | |
Hi, I have written a code which when I debug gives the following error: Windows has triggered a breakpoint in Test_1.exe. This may be due to a corruption of the heap, which indicates a bug in Test_1.exe or any of the DLLs it has loaded. This may also be due … | |
Hello I am totaly new in field with microcontroller programming using c. can anyone help me out by suggesting good tutorial? | |
Hello, I just starting with C and I am having a problem that I can´t understand. Here is the code: #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *M; M=fopen( "m", "r"); char line [ 540 ]; long int i=0; struct estr_reg { char *molid; char *molc; }; struct estr_reg reg[6]; … | |
hi everyone!!! ive just got an assignment from my teacher to make some graphics in C and i know nothing about it,can someone plzzzz help???? reply as soon as possible...plzzz | |
Hi! The following program gives the integer value of char string as output.Suppose if we give "1998",it will give integer 1998.In [CODE]i=i<<3+i<<1+(*string-'0')[/CODE]I understood that it will multiply i by 10,but in *string-'0' I don't know what is going there..?.Here what refers string is it index in 1998 or whole 1998. … | |
I wrote this simple program in C to generate binary search tree, but i am unable to go beyond level 0. Note that I have not incorporated the printing part. [code] #include<stdio.h> #include<malloc.h> struct node { int data; struct node *lc; struct node *rc; }*start,*link,*tmp; int a[100]; int main() { … | |
i am in search of a book for data structures using C. Anyone can recommend me one? | |
Hi all, I need to convert a char array to an int. But the char array has regular characters in them('A', 'B', 'C'...) and numbers. how would I omit those characters and extract the number, then store it as an int. any help would be great thanks. | |
hello friends...i need some help again.it's little hard to understand that whats the use of ungetc() function.Can you people explain that with some examples.please..i'm still learning.And new to this stuff.. | |
Could You Please Explain me what is memcmp? What does the 'size_t' means to? | |
Hi all, Why do I get a fatal error when I try and free this memory? [CODE] char *timeBegin = (char *)malloc(sizeof(char) * 21); timeBegin = time_stamp(); sleep(1); char * test; test = calc_time_difference(timeBegin); printf("%s", test); free(timeBegin);[/CODE] time_stamp() returns a static char array. Would this be the cause? | |
I'm in the process of coding my own OS and right now I'm working on a stdio lib but was just wondering about fputs and how it should write to the screen, which would be a better approach? Making stdout a file descriptor and having puts call fputs with the … | |
The program is fetching me the right output but still i am getting a warning #include<stdio.h> #include<string.h> int main() { char *p,*q; p=(char *)malloc(25); q=(char*) malloc(25); strcpy(p,"hello" ); strcpy(q,"hi"); strcat(p,q); printf("%s",p); } Warning test7.c: In function ‘main’: test7.c:6: warning: incompatible implicit declaration of built-in function ‘malloc’ wat exactly is the … | |
Hi, I need some help from u again..... if we type: Enter Input : eee ddd cccc the result should be like this : sorting : ddd eee cccc but actual result is like this : sorting : eee eee cccc I don't know why... Can u help me ?? … | |
Hi, so im new to this website. I am trying to write a program that tells you if a number is prime, but i have an error message that keeps popping up saying : error C2447: '{' : missing function header (old-style formal list? Here is my code: [CODE=C] #include … | |
Hi, I've been developing some code that parses output reports and re-reports on information that is of interest. I utilize strtok quite heavily in this program and I have run into the situation where my final strtok call may or may not return some info. Depending on if there is … | |
[CODE] #include <stdio.h> #include <unistd.h> int main() { while(1) { fprintf(stdout,"hello-out"); fprintf(stderr,"hello-err"); sleep(1); } return 0; } [/CODE] why is that i am getting heelo-err instead of hello-out | |
I cant get this program to work I can get it to read in the file and enter the winning numbers but it just ends after it. the program is supposed to take in a file (input.txt) and make it into a list of structs with peoples names and lotto … | |
Ok, so I need some help. I've already submitted this for a grade, but I just want to know how to do it better. I don't know how to create functions for this program due to the structs and pointers. I would appreciate any help. Essentially I want to create … | |
Im a beginner level programmer in C and want to know how can I use malloc or calloc functions for dynamic memory allocation without typecasting...? |
The End.