15,552 Topics
| |
I need to read parameters from a file called "params.c", the following is the codes which can read parameters from that file. But I am not totally understand. Hope anyone can give detailed answers. Thanks. In a file called "params.c" I have: [code=c] #include "systems.h" /* it includes all .h … | |
Hi. The objective is to sort an array of doubles. My effort is listed below: [CODE=C] #include <stdio.h> #define MAX 10 void sort( double* n[], int q ); void print_nums( double* n[], int q ); int main( void ) { double* nums[MAX]; int i; for( i = 0; i < … | |
[code=c] #include<stdio.h> #include<string.h> float avg(float); main() { FILE *p[2]; int k,students=10,subjects=4,i,j,id_number,date_of_birth,fail=0; float marks[100],total=0,avg; char name[30],course_enrolled[30],filename[10]; for(i=1;i<=2;i++) { printf("filename"); scanf("%s",&filename); p[i]=fopen(filename,"w"); printf("Enter Name of Student\n",p[i]); fscanf(stdin,"%s",&name,p[i]); printf("Enter Course In Which Student Is Enrolled\n",p[i]); fscanf(stdin,"%s",&course_enrolled,p[i]); printf("Enter ID Number Of %s Enrolled in Course %s\n",name,course_enrolled,p[i]); fscanf(stdin,"%d",&id_number,p[i]); printf("Enter Date Of Birth Of %s Enrolled … | |
please tell any website for study of hexadecimal objective programs or Questions in C. | |
Hello, I'm normally the Java programmer here, but we got some old stuff running Pro*C.....anyway this is my error: myprops.c: In function `my_setupPropertyCursor': myprops.c:10931: error: called object is not a function Here's the code: [code=c] /*================================================================ Name: mylibprops.c Compile myprops to include this code. 10/29/04 -- MG -- Convert to … | |
I'm unable to make these programs and have to submit on thursday!!:'( [COLOR="Red"]Q. Make a header file that contains the function definitions of all the function prototypes defined below: • int strlen(char *); • void strcpy (char*, char*); • void strcat(char *, char *);[/COLOR] [COLOR="Red"]Q.Using unions, write a program that … | |
Wow. It's kinda strange to even consider that I am taking part in the creation of an operating system... It really wasn't that long ago that I wasn't even capable of writing a functional program... I owe a good portion of my achievements to you posters here on DANIWEB (especially … | |
Hi. Objective: Write a program that declares a 12*12 array of characters. Place Xs in every other element. Use a pointer to the array to print the values to the screen in a grid format. Listed below is my non-functional attempt. Any help would be most appreciated. Thanks, Molly [CODE=C] … | |
[code=c] typedef struct _node{ char *name; char *desc; struct _node *next; }node; #define HASHSIZE 101 static node* hashtab[HASHSIZE]; char* m_strdup(char *o){ // the m_strdup function....... int l=strlen(o)+1; char *ns=(char*)malloc(l*sizeof(char)); strcpy(ns,o); if(ns==NULL) return NULL; else return ns; } int install(char* name,char* desc){ unsigned int hi; node* np; if((np=lookup(name))==NULL){ hi=hash(name); np=(node*)malloc(sizeof(node)); if(np==NULL) … | |
Hi I have to make a C program which has to perform a specified event at a specified time. Something like this... [code] Print Hello at 13:15 Print Bye at 14:20 Print working at 13:57 [/code] Assume that these instructions are already available. I am thinking of creating a doubly … | |
Hello, Could you explain me what this statement means? I am confused with k/=2 as iteration statement. [icode] for (int k = p; k > 0; k /= 2) [/icode] Thanks | |
I am creating a new sorting algorithm as a machine problem and i encounter difficulties. The logic of my said the said algorithm is to create an array by inputing the total numbers to be accepted followed by the array variables and sorting it ascending or descending. The array would … | |
hi all, i've a problem in converting struct into short here's the code i'm using, but it's still error while i'm running it. [CODE] typedef struct ip_header; unsigned short *temp; memcpy(temp, &ip_header, sizeof(ip_header)); [/CODE] any help will be greatly appreciated. thx. | |
how can i put the filename get in scanf("%s", &filename); in fopen("filename.txt", "a"); [CODE=c] main() { FILE *file; . . . printf("type the filename (.txt): "); scanf("%s", &filename); file = fopen("filename.txt", "a"); fprintf(file, "..."); fclose(file); . . . } [/CODE] | |
i'm trying to print the suits of the cards [CODE=c]typedef enum{diamonds, spades, hearts, clubs}SUIT; typedef struct{ SUIT suit; int value; }CARD; typedef struct{ CARD *cards[52]; int atual; /*indicates the next card to be withdrawal of the deck*/ }DECK; typedef struct{ char name[30]; CARD hand[3]; CARD biggest_card; int num_victories; }PLAYER; switch(suit) … | |
how can i sort in decreasing order? i did the sort is in increasing order [CODE=c] typedef struct{ char name[30]; CARd hand[3]; CARd biggest_card; int nro_victories; }PLAYER; PLAYER h; int m, i, j, k; for(i=0; i<n_playeres-1; i++) { k = j; m = h[i].nro_victories; for(j=i+1; j<n_players; j++) { if(h[j].nro_victories < … | |
i learnt c language but iam not aware of practical applications of c.how this can be used in development of any softwares,webdesigning ,or creating a virus or destroing a virus.can any one show any one practcally so i can be aware of and i will try in furthur applictions. thankingyou............. | |
i need help on my homework problem. i have done the operations part (+, -, *, /, sqrt) but i am really having a [B]problem on making my calculator accurate up to 40 digits and to truncate all the non-significant zeroes on the output[/B]. i don't know what data type … | |
I have a quick questions regarding a a certain style of coding I have seen that I found to be rather unique. It entails including C files within a program to allow for easy changes of constants and other variables on the fly. This method is used because of the … | |
how can i convert string os size[10] to float. also i cannot use atof or sscanf. im asked to use bitwise or anyother methos which will take less processiong time. is there anyway. thank you | |
hello, I think I have a rather straightforward problem, but I'm relatively new to C. I have an input file that looks like this: [code] 0.682448 0.53791 0.61727 0.48714 0.297144 0.29688 0.40549 0.68233 0.426100 0.62057 0.25095 0.54782 0.673007 0.51040 0.25476 0.35149 0.641339 0.49815 0.54557 0.42673 0.268030 0.38949 0.48841 0.56580 ... … | |
I am currently experimenting with function pointers as part of a larger project. Drawing from both online sources and textbooks. The problem however is that after storing the values as an array, when i call them the functions either fail to be called, or if i attempt to print the … | |
I'm wondering how to do this in C: (i need this for my project)... how to replace this line [URL="http://img368.imageshack.us/img368/7854/sp326rt3.jpg"]http://img368.imageshack.us/img368/7854/sp326rt3.jpg[/URL] with a printf & scanf statement? i want to hide those lines and it will be replaced with another statement. and how to make the screen window fixed (meaning not … | |
I want this program to calculate an actors age at the time a movie they made was released, the user inputs all the data... I dont know C just learning but this is the layout I thought of any help would be appreciated, this does not compile [CODE]#include <stdio.h> int … | |
Hi can anyone help me, I am learning the language C but need some help writting some code. what i need to do is from the input of the keyboard i need to find the max and min of some values and out put them. what i got so far … | |
Hello friends, Could someone tell me if i want to read a particular text from a file that exist in each line of file. How could i do this? My text is like this: poll mail.telesys.com protocol POP3 user [email]vipin@gmail.com[/email] password abcd mda "cat > /export/home/m7istp/imcp/bin/ml201.txt now i want to … | |
i'm trying to do a biggest card game in c but i'm reciving some errors that i can't figure out please help me... the functions are separeted of the main(project) i'm receving the error 'incompatible types in assignment' in the function compare card [CODE=c] /*This function compares card1 with card2 … | |
i want to make a text programe ,this program supposed to have a text mode and a command mode; in text mode you can type and whit arrow key change your position in command mode by typing your comman you can get the results for example: by typing copy 2 … | |
Hi Guys This has been going on for a while but now I have finally decided to do something about it. A few weeks ago I compiled a small C program from a book I was reading. It compiled fine but I wanted to make a slight change to the … | |
Hi, i'm new to C programming and i could use some help with an assignment. i would like to store a word in a linked list, with each letter of the word in a separate node of the linked list. i would then like to traverse the linked list to … |
The End.