15,540 Topics

Member Avatar for
Member Avatar for rraj.be

I am a beginner programmer an i started a project to build a mp3 player of my own. This is my first project in big level. Any kind of guidance or help will be greatly useful to me. If any one have some idea's please help me.

Member Avatar for marco93
0
189
Member Avatar for neknek

I have problems with searching & sorting strings in a file... I want to alphabetize the string so I did this [CODE]{for(x=0; x<100; x++) { for(c=x; c<15; c++) fscanf(stdin, "%s", student[c]->surname); if(strcmp(student[c]->surname,student[c+1]->surname)<0) {strcpy(temp,student[c]->surname); strcpy(student[c]->surname,student[c+1]->surname); strcpy(student[c+1]->surname,temp); strcpy(temp,student[c]->name); strcpy(student[c]->name,student[c+1]->name); strcpy(student[c+1]->name,temp); strcpy(temp,student[c]->number); strcpy(student[c]->number,student[c+1]->number); strcpy(student[c+1]->number,temp);} } }[/CODE] when i run the program, it just …

Member Avatar for ssharish2005
0
103
Member Avatar for Vao

[code=C]#include <stdio.h> #include <stdlib.h> void showBoard(int pLife[],int pType[]) {// WORKS NO-TOUCHY! int i; printf("\n*-----------------------------------*\n"); printf("| | | | | | |\n"); for(i=0;i<=5;i++) {printf("| %d-%d ",pLife[i],pType[i]);} printf("|\n"); printf("| | | | | | |\n"); printf("|-----+-----+-----+-----+-----+-----|\n"); printf("| | | | | | |\n"); for(i=6;i<=11;i++) {printf("| %d-%d ",pLife[i],pType[i]);} printf("|\n"); printf("| | | | …

Member Avatar for ssharish2005
0
150
Member Avatar for fishwater00

First of all, I need to thank all friends helping me here. Those days I learn a lot from your advices. The basic idea of my code is to read velocity file into domain[i].velocity[k]. Start!!! If I have a struct [code=c] typedef struct {int nx, ny, nz; float *velocity, *pwave, …

Member Avatar for fishwater00
0
139
Member Avatar for champnim

[code] struct fifo { int result; char *info; struct fifo *next; }*node; void add(struct fifo **n,int data,char *text) { struct fifo *temp,*node1; if (*n==NULL) { temp=(struct fifo *)malloc(sizeof(struct fifo)); printf("%d is to be stored\n",data); temp->result=data; printf("%d is stored\n",temp->result); temp->info=(char *)malloc(strlen(text)+1); strcpy(temp->info,text); temp->next=NULL; *n=temp; } else { temp=*n; while(temp->next!=NULL) temp=temp->next; node1=(struct …

Member Avatar for champnim
0
632
Member Avatar for maaply

Hi everybody, I have interview on next week. I know some question will come from link list. What kind of question will come in face-to-face interview's?. If some one post that kind of question, that will be very helpful to me. In this interview Question will be in C only. …

Member Avatar for Jishnu
0
62
Member Avatar for Clockowl
Member Avatar for champnim

I have made a singly linked list that holds an integer & a string. The creation of the list works fine but deletion of a node is giving an error. Previously I was not adding a string to my list(only adding int)& at that time the code was working. please …

Member Avatar for LouPascalou
0
137
Member Avatar for marcusbarnet

Hi to all! Is there a way to go and read a particular line in a text file? For example, i have a text file like this: 15 nick 25 marcus 18 sarah where each line contains an integer (age) and a string (a name). I'd like to write a …

Member Avatar for marcusbarnet
0
975
Member Avatar for fishwater00

Question 1: [code=c] typedef struct { int x, y, z ; float *wave; float *velocity; }Model; void a(Model *domain); void b(Model *domain, int t); int main() {int i; int j=10; Model Domain; Domain=(Model *)malloc(sizeof(Model); for (i=0; i<10; i++) a(domain); return; } [/code] if I block "Domain=(Model *)malloc(sizeof(Model)", the compiler doesnt …

Member Avatar for fishwater00
0
253
Member Avatar for nishanthaMe

Hi all I am developing a simple socket application which fetch a given URL from the web and save it in the local hard drive. But my internet connection goes through a proxy and I would like to know that what is the connecting URL and the port for my …

Member Avatar for jephthah
0
58
Member Avatar for Dionysus
Member Avatar for michinobu_zoned

OKay, this is in response to the same issues I've been dealing with in another thread. In that one, someone gave me the documentation to the the POSIX calls, but they were vague and weren't too descriptive. I don't know what exactly each one of the calls do. I only …

Member Avatar for Duoas
0
102
Member Avatar for inventer

Hi! I am new to C programming, so this question might sound foolish. I have a problem with output of a program (sometimes the output is wrong) Following is the program: (I am using Turbo C compiler) /* Calculate simple interest */ #include <stdio.h> main() { int p, n; float …

Member Avatar for ssharish2005
0
233
Member Avatar for chandra1186

Hello i am new to c language i am unable to understand Functions in so any one help me to understand that topic. Thank you in advance.

Member Avatar for ssharish2005
0
243
Member Avatar for barbiegirl

hi everyone, i was writing an application, with the c language, which asks the user to give the number of strings to sort, and then sort'em, but i had some problems that i can't figure out, would u please help me [CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> void getting(char *words[], int num); void …

Member Avatar for barbiegirl
0
111
Member Avatar for sivakrishna

modify the program siutably so that once the calender for a particular year has been displayed on screen , and year has been displayed on the screen,then using arrow keys the user must be able to change the calender in the following manner: UP ARROW KEY :next year,same month DOWN …

Member Avatar for ssharish2005
-1
170
Member Avatar for Aleczz

Hello Im coding mp3 encode / ripping tool and because i have licence to realbasic im gonna make user interface with it Technical part im gonna make with akrip.dll and i have develope it more by my own way now. The meaning is use threads for ripping and encode in …

Member Avatar for Aleczz
0
154
Member Avatar for manavsm

i want to delete the entry of a student using its roll no....its not working It is my earlier program and i just modified it but now i am not being able to perform deletion operation..if you will help me my project will get over.. [icode] #include<stdio.h> struct student { …

Member Avatar for stephen84s
0
109
Member Avatar for NiNTENDU

Hi all, this is my first post! I'm pretty new to C and maybe this is a dumb question. I've a function that accept a string as a parameter for modify it but it doesn't (I'm sure there is some logical mistake with pointers): [CODE=C] void doSomething(char *string) { string …

Member Avatar for NiNTENDU
0
796
Member Avatar for manavsm

PLZ HELP ME WITH THIS CODE...I HAVE GIVEN THIS CODE SO MANY TIMES BUT NOBODY IS ABLE TO CLEAR MY ERROR.... 1.DISPLAY IS NOT COMING ONLY LAST VALUE I ENTER IS DISPLAYED 2.DELETION OPETATION .............AND YES I WANT TO USE LINKED LIST....IF ANY 1 KNOWS IT TELL ME............. [ICODE] #include<stdio.h> …

Member Avatar for Luckychap
0
145
Member Avatar for Visage

Hi everyone, I am having trouble using enums in structs. I am developing for the linux platform, with the gcc compiler. Below is an example of the code that produces the error. [code=c] enum Day {Monday=0x01, Tuesday=0x02, Wednesday=0x03}; typedef struct { int numberofDays; Day weekday; } Week; [/code] When I …

Member Avatar for Ancient Dragon
0
159
Member Avatar for govind_kishan

I want 2 convert a C prog. into HEX code. We are using microcontroller IC AT89C52.

Member Avatar for jephthah
0
108
Member Avatar for fishwater00

[code] #include ”functions.h” typedef struct { int x, int y, int z; }Model; int main() { Model PARA[100]; PARA=malloc(sizeof(struct Model)); myfunction(int A, int B, int C, PARA); return: } [/code] In another file, I define “myfunction”: [code] void myfunction(int a, int b, int c, Model *para) { a=b=c=10 ; /*can …

Member Avatar for fishwater00
0
105
Member Avatar for petermichael

I have this task and i dont know how to do it, any help will be appreciated I want to do it in C language under linux Evaluate Boolean expression given by the user by using tree data structure. An example of the Boolean expression is ((X1 * X2 * …

Member Avatar for jephthah
0
30
Member Avatar for Frenchstar

Hi, i am stuckon this particular assignment. I will appreciate it if you guyz help me out on these problems.............. 1. Write two functions Max( ) and Min( ) where • max() returns the maximum of two integers • min() returns the minimum of two integers • Each function takes …

Member Avatar for Jishnu
0
95
Member Avatar for emilio

is there any way to synchronize two processes after fork() command. if i had deal with threads i know i can use pthread_mutex to make them work one after another. can i do so with processes ?

Member Avatar for stephen84s
0
47
Member Avatar for sambafriends

[code=c] main( ) { int i=10,j=20; printf("%d%d",&i,&j); return 0; } [/code] When i executing this code: I got the address values like -12, -10, -20 Is it the address are in negative values or I am doing a mistake in the program. please give the solution it's urgent.

Member Avatar for awi123
0
111
Member Avatar for manavsm

i am facing problem when i am trying to get input...my input is not being taken correctly ... #include<stdio.h> struct student { char name[20]; int rollno; struct student *next; }; void display(struct student *first) { struct student *ptr; ptr=first; printf("\nCurrent list:\n"); while(ptr!=NULL) { printf("Name:%s\nRoll:%d",ptr->name,ptr->rollno); ptr=ptr->next; } } void delet(struct student …

Member Avatar for jephthah
0
171
Member Avatar for gargg321

Hey Guys, I am new to C programming and I got a task of storing hex dumps in character array and then use them as a string. I use the sprintf function for the job but it is giving me incorrect results. Please help me out. I am writing a …

Member Avatar for gargg321
0
268

The End.