15,540 Topics

Member Avatar for
Member Avatar for zubermohammad

hi friend i have a problem in coding a program it states that you have to take input of suppose ten players and their team with their batting average there may be all tn different team or any but less than ten and i have to sort them by their …

Member Avatar for Salem
0
77
Member Avatar for edouard89

Hello everyone, I am having a problem with a function I am working on. It has to do the following: [quote]Outputs the null-terminated string pointed to by s starting at row row and column column, in a field of length characters. As with dtioCursor(), the row value 0 refers to …

Member Avatar for edouard89
0
106
Member Avatar for nikhil.laghave

Hello All, I am trying from a Fortran program, to call a subroutine that I wrote in C...I named the C code file as filename.c and the subroutine is: void filename() Now in a fortran program, I am calling this subroutine as: Call filename() I am getting the following error: …

Member Avatar for ArkM
0
235
Member Avatar for trowa0830

hi i need some help in this program.. using only 1 for loop.. [code] #include<stdio.h> void main() { int n; clrscr(); for (n=1; n<=10; n--) { printf("\n %d",n); } getch(); } *the output of this program is" 1 2 3 4 5 6 7 8 9 10 but i need …

Member Avatar for Aia
0
286
Member Avatar for nikhil.laghave

Hello, I am a new user to Daniweb. My regards to all. Well my C skills have taken a lot of rust and I am stuck at a small issue. I want to read a data file containing some information. Now I want to read 2 integers from this file, …

Member Avatar for nikhil.laghave
0
261
Member Avatar for pdk123

following is a simple embedded c piece of code, can somebody tell me is there a problem in it ? [code=c] boolean new(int a) { return !(a & 7); } [/code] i am new to embedded programming. It will be great help, any pointers to this ... thanks pdk

Member Avatar for Prabakar
0
187
Member Avatar for kzdev

I want to make a function to pass and return values from the same arguments. For example prm3=0 after function's execution must become prm3=3, and next prm3=6, and next prm3=9 ... I wrote the following but it doesn't work. p1,p2,p3 are not passed to prm1, prm2, prm3. What is wrong? …

Member Avatar for kzdev
0
104
Member Avatar for Anbuvengeance

I have this program to add, edit, delete and view the student file, which is save as student.csv. The problem is that the only function that is working is the add and view. The edit and delete does not have problem on the code but it does not edit and …

Member Avatar for Anbuvengeance
0
84
Member Avatar for jirving

i'm really having a problem on how to start my homework. this is regarding to my first post ([URL="http://www.daniweb.com/forums/thread132760.html"]http://www.daniweb.com/forums/thread132760.html[/URL]) thanks to the one who answered, i realized that i needed to use arrays on this. i realized that i needed to solve the problems manually, meaning that i have to …

Member Avatar for Adak
0
128
Member Avatar for virtual008

I'm learning C and can someone tell me if I'm doing file input right? I know file and user input can be insecure because of buffer overflows. [code=C] #include<stdio.h> int main(int argc,char *argv[]) { FILE *file; char c; int lines = 1; if(argc == 2) { file = fopen(argv[1],"r"); if(file …

Member Avatar for ArkM
1
174
Member Avatar for shankhs

I am trying to implement edit string algorithm given in: [url]http://en.wikipedia.org/wiki/Levenshtein_distance[/url] in C and I am repeatedly getting "segmentation Fault" I dont understand why......:( Here is my code [code] #include<stdio.h> #include<string.h> int minimum(int a,int b,int c) { int min; if(a<b) { if(a<c) min=a; else min=c; } else { if(c<b) min=c; …

Member Avatar for ssharish2005
0
123
Member Avatar for Crushyerbones

I am doing some self-made exercises lately to practice my C skills. One of them is something like this: Given a file with something like: "Peter Wilson the swordsman". I want to store "Peter Wilson" in the char array "name" and "swordsman" in char array "title". So far I've tried …

Member Avatar for Crushyerbones
0
94
Member Avatar for jayee_spicyguy

Header file which contains follwing code please help me [COLOR="Red"]#define X {{1,1,2,3,4,5,66},{3,2,4,1,5,0}} [/COLOR] X was used as a member to another Macro [COLOR="red"] #define Y {X,F,I}[/COLOR] like this F and I also defined in the same format as X My question is how to acess these elements because No where …

Member Avatar for Ancient Dragon
0
78
Member Avatar for soultrav

Hello! I am trying to make a program for string compression using LZ compression techniques, but the program is at the beggining - I fail to realise what goes wrong, but I think it is a problem with string operations. [code=C] #include <stdio.h> #include <conio.h> typedef struct comp { char …

Member Avatar for Narue
0
147
Member Avatar for kzdev

The following is a visual basic code [CODE] dim Msg1(5) Msg1(1) = "xMessage1" Msg1(2) = "xxMessage2" Msg1(3) = "xxxMessage3" Msg1(4) = "xxxxMessage4" Msg1(5) = "xxxxxMessage5" For cnt = 1 To 5 Debug.Print Msg1(cnt) Next cnt[/CODE] How can I do the same thing with ANSI C? (Instead of Debug.Print can be …

Member Avatar for kzdev
0
79
Member Avatar for C++masterinneed

i need to find a way to print the number of arguments --- example ---- ./a02 er t r child process : counts four argument ---- what the output is now ---- er ; t;r; and problem 2) how can i make a call to reader for every character----instead of …

Member Avatar for Ancient Dragon
0
94
Member Avatar for QuartzZapphyre

i'm an 2nd year IT student i'm having a hard time understanding functions can anyone please explain to me in layman's terms what are functions,kinds of functionsand i would really apprieciate it if you could give me some basic function oriented program in C

Member Avatar for ssharish2005
0
93
Member Avatar for mancode1007

Anyone please help me to find out ...where is the error because this program will continue untill the user enter 0 the program will terminate ...but i stuck at here please help... [ICODE]#include<stdio.h> struct student{ int id_no; char name; int average; int main() { struct student stud1; do{ printf("Enter Index …

Member Avatar for ssharish2005
0
116
Member Avatar for fishwater00

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 …

Member Avatar for ssharish2005
0
167
Member Avatar for java_girl

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

Member Avatar for ssharish2005
0
977
Member Avatar for raja289

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

Member Avatar for Ancient Dragon
0
147
Member Avatar for goodsp_007

please tell any website for study of hexadecimal objective programs or Questions in C.

Member Avatar for Salem
0
49
Member Avatar for mimsc

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 …

Member Avatar for Dave Sinkula
0
547
Member Avatar for ashalina

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 …

Member Avatar for Narue
0
81
Member Avatar for Brent.tc

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 …

Member Avatar for Brent.tc
0
92
Member Avatar for java_girl

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

Member Avatar for Dave Sinkula
0
119
Member Avatar for arun0107

[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) …

Member Avatar for Prabakar
0
157
Member Avatar for champnim

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 …

Member Avatar for Narue
0
88
Member Avatar for beatlea

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

Member Avatar for beatlea
0
114
Member Avatar for SwiftDeath

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 …

Member Avatar for SwiftDeath
0
217

The End.