15,549 Topics

Member Avatar for
Member Avatar for george61

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", …

Member Avatar for prvnkmr449
0
3K
Member Avatar for Babaty

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 …

Member Avatar for prvnkmr449
-3
116
Member Avatar for poulami510

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 …

Member Avatar for prvnkmr449
0
112
Member Avatar for gudads

#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?

Member Avatar for gudads
0
113
Member Avatar for atomic33

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

Member Avatar for Ancient Dragon
-2
111
Member Avatar for challarao

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. …

Member Avatar for Ancient Dragon
0
116
Member Avatar for rapids79

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 …

Member Avatar for Ancient Dragon
0
140
Member Avatar for malvi

Hello I am totaly new in field with microcontroller programming using c. can anyone help me out by suggesting good tutorial?

Member Avatar for Adak
0
179
Member Avatar for paula_m

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]; …

Member Avatar for samkaraja
0
204
Member Avatar for lonely_girl

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

Member Avatar for Adak
0
251
Member Avatar for challarao

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. …

Member Avatar for Ancient Dragon
0
103
Member Avatar for titan_31

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() { …

Member Avatar for Narue
0
172
Member Avatar for Kakashi Hatake

i am in search of a book for data structures using C. Anyone can recommend me one?

Member Avatar for Ancient Dragon
0
74
Member Avatar for Danny_501

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.

Member Avatar for Ancient Dragon
0
198
Member Avatar for baby_c

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..

Member Avatar for Adak
0
109
Member Avatar for Uvais

Could You Please Explain me what is memcmp? What does the 'size_t' means to?

Member Avatar for prvnkmr449
0
153
Member Avatar for Danny_501

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?

Member Avatar for Narue
0
115
Member Avatar for Auraomega

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 …

Member Avatar for Auraomega
0
99
Member Avatar for rahul8590

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 …

Member Avatar for rahul8590
0
252
Member Avatar for meer pakala
Member Avatar for smith32

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 ?? …

Member Avatar for Adak
0
219
Member Avatar for Nothing595

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 …

Member Avatar for prvnkmr449
0
155
Member Avatar for JayNak

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 …

Member Avatar for Ancient Dragon
0
202
Member Avatar for rahul8590

[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

Member Avatar for Narue
0
139
Member Avatar for snorflack

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 …

Member Avatar for snorflack
0
98
Member Avatar for draconias22

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 …

0
40
Member Avatar for macrogeek

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...?

Member Avatar for manojwali
0
209
Member Avatar for vic18
Member Avatar for krille_x

Hi Im rather new to this but I want to ask how to re-define the array argv[] after the program main(int argc, char *argv[]) have been called? example main(int argc, char *argv[]) //assume the program is called by: program //this would give argc=1 and argv[0]= program //but know I want …

Member Avatar for Narue
0
166
Member Avatar for illuminatus89

Through my knowledge, I know that by declaring a variable as 'const', its stored in read only memory and at the same time I found that a const variable's value can be changed using pointers. How is it possible?

Member Avatar for manojwali
0
98

The End.