15,550 Topics

Member Avatar for
Member Avatar for death_oclock

Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; …

Member Avatar for Aia
0
133
Member Avatar for zoner7

I'm currently taking a computer security class. The thing is, I haven't even taken an intro computer programming course. I taught myself a good deal of C++ back this summer, but I hardly know as much as the other students in the class. we were asked to manipulate the following …

Member Avatar for zoner7
0
790
Member Avatar for plike922

I am try to change my previous created program that get student data from 5 students and stores it into a data base. i want to make it that you can choose the amount of students to put in. I was thinking of asking for the number then changing the …

0
76
Member Avatar for hsoni007

When I run the following program , after loop it outpur "Enter Valid Number". How can I solve this problem? --------------------------------------------------------------------------------- #include <stdio.h> #include <conio.h> #include <string.h> void main() { int var1,var2,sum; char Choise; while (Choise!='q'){ printf("\n(1)A-Add two integers.\n\n(2)C-compart two integers for the larger.\n\n(3)F-Test an integers for odd or even.\n\n(4)Q-Quit.\n\n"); …

Member Avatar for Salem
0
101
Member Avatar for mohinig

i m a new user of c language.whenever i try to run my program a message error is displayed as"not able to open the file named C0S.OBJ.what is the meaning of that?and what should i do?please anybody help me.

Member Avatar for Salem
0
91
Member Avatar for Logi.

Hi there, I am trying to write a queue ADT using a linked list in C and have hit a snag initialising my queue... [code=c]typedef struct qNode{ int element; struct qNode *next; } qNode; typedef struct Queue{ struct qNode *front; int len; } Queue; Queue create_queue() { Queue q = …

Member Avatar for Logi.
0
183
Member Avatar for Lovieron

THIS PROGRAM IS not yet complete the only problem is when the program calls for the find it process..it does not work perfectly i don't know why..but when i separate it its working..please help me with this.. this is how it looks separated from the optional program: #include<stdio.h> #include<conio.h> int …

Member Avatar for Aia
0
197
Member Avatar for mohan_198505

hi ,i want to know that if i m taking the input from user in C through scanf what should be the code if the requirments are following. 1.should accept string minimum of 3 and maximum of 15 characters. 2.accept alphabets ,blank space hyphen(-)and & 3. first latter should be …

Member Avatar for Aia
0
112
Member Avatar for lonely_girl

Hi. Ive made this program using if statements i see no errors in it but i dont know my program isnt working on my if statements i mean the if statements are not used in the output. Can u plzz figure out the problem? It works only till scanf statement. …

Member Avatar for lonely_girl
0
139
Member Avatar for encee

i am trying to read a text file like this and store each number as an integer (without the decimals) and print them 1 3 5.6 3 2.1 4 2 2 3 4.2 1 here is what i have now [code=C] #include <stdio.h> #include <conio.h> void main() { int i, …

Member Avatar for me_ansh
0
1K
Member Avatar for slnvpraveen

/* MATRIX ADDITION */ #include<stdio.h> #include<conio.h> #define MAX 100 struct Matrix { int Element[MAX][MAX]; int No_of_Rows; int No_of_Cols; }; void MatrixAdd(const struct Matrix *,const struct Matrix *,struct Matrix *); int i,j; void main() { int p,q; struct Matrix Mat1; struct Matrix Mat2; struct Matrix res; clrscr(); printf("\nEnter size of the …

Member Avatar for Aia
0
91
Member Avatar for Trendkiller

I can't find the error and also C2182 error: illegal else without matching if. [code=c] #include <stdio.h> int main (void) { int count=0; //counter int hours; //hours char choice; //users choice for continuing float total=0; //total charge //print display printf ("%-15s %-10s %-10s","Customer","Hours","Total Charge"); //assinging customer number count++; //ask for …

Member Avatar for me_ansh
0
317
Member Avatar for me_ansh

Hello every one, I have a confusion regarding arrays and pointers, My question is: "Is array name a pointer (rather a constant pointer)"?? I feel the answer is 'yes' because we can use the de-referencing operator(*) with the array name, Also, because array name is a constant pointer so we …

Member Avatar for Narue
0
250
Member Avatar for asharrajpoot

i want to show output like this [code] A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B …

Member Avatar for me_ansh
0
186
Member Avatar for boomtoom

void main() { int number; totalCallsPtr pcall=NULL; getData(&pcall,&number); } void getData(totalCallsPtr* pcall,int* number)//get data from the text file { int i,n; FILE *f1; f1=fopen(INPUT, "r"); if (f1==NULL) printf("File not open!\n"); else { fscanf(f1,"%d",&n); *pcall=((totalCallsPtr)malloc(n*sizeof(CALL))); } if((*pcall=(totalCallsPtr)malloc(n*sizeof(CALL)))==NULL) printf("not enough memory to allocate"); for(i=0;i<n;i++) { fscanf(f1,"%d ",&pcall[i]->day); fscanf(f1,"%d:%d:%d ",&pcall[i]->startCall.hours,&pcall[i]->startCall.minutes,&pcall[i]->startCall.seconds); fscanf(f1,"%d:%d:%d ",&pcall[i]->endCall.hours,&pcall[i]->endCall.minutes,&pcall[i]->endCall.seconds); fscanf(f1,"%c",&pcall[i]->type); …

Member Avatar for me_ansh
0
121
Member Avatar for titosd

Hello, I have a question I should write a program that read words from file text and sort it by ABC letters in array, and ask the user to enter a sentence and chcking if the words in the sentence existing in the array. the program checking all the words …

Member Avatar for me_ansh
0
190
Member Avatar for Lovieron

i need help regarding determining the longest word of a string..we would enter a sentence and the program would display the longest word/s i have read ideas about the strtok but i cant seem to understand it that much..and we havent discussed that yet so my prof might question it..i …

Member Avatar for Lovieron
0
135
Member Avatar for TheBeast32
Member Avatar for MosaicFuneral
0
54
Member Avatar for akim_atl

I wrote this program and I need to know if I didn't make a mistake Let arr be an array of 20 integers. Write a program that first fill the array with up to 20 input values and then finds and displays both the subscript of thee largest item in …

Member Avatar for Aia
0
87
Member Avatar for Wassa76

I have a text file containing several lines of IP's and Ports with 3 sets per line. For example: [CODE]IP1=1.2.3.4 PRT1=100 IP2=2.3.4.5 PRT2=200 IP3=3.4.5.6 PRT3=300 IP1=12.34.56 PRT1=1000 IP2=2.3.4.5 PRT2=200 IP3=3.4.5.6 PRT3=300[/CODE] I want to read in each line, see if PRT1 matches a specific port, if so then print out …

Member Avatar for Wassa76
0
61
Member Avatar for bemo55

I am doing an extra assignment for my CSCI class. The assignment asks to create a program that calculates hours for customers in a parking garage. i wrote my program out and now i am trying to break it down into custom functions. i was doing fine until i got …

Member Avatar for death_oclock
0
94
Member Avatar for atman

[CODE] #include<stdio.h> #define COUNT 5 void enter(int *p_arr); void report(int arr[], int count); int main() { int arr[5]; int i; for(i=0; i < COUNT; i++) { enter(&arr[i]); } report(arr, COUNT); } void enter(int *p_arr) { int i; int insert; printf("\nplease enter the number:"); scanf("%d", &insert); p_arr[i]=insert; } void report(int arr[], …

Member Avatar for atman
0
120
Member Avatar for mohan_198505

hi, i m mohan i hv problem related to file handling. i hv two txt files emp.txt and dpt.txt.these are following emp.txt 1111 Tata 1000 12354663 1112 Suresh 1001 -46436433 1113 Hari 1002 46546735 1114 Ramaji 1000 -54651324 where 1111 is a empId,Tata is EmpName,1000 is DeptCode and 12354663 is …

Member Avatar for death_oclock
0
89
Member Avatar for rhoit

I was creating some sort of text editing program. Whose display and file writing are going parallely. How to clear the character in the file when i dont back space. I tried clear character by replacing with Space(32), NULL(0), but it didn't workout fine.. just replacing the character...how do delete …

Member Avatar for Murtan
0
132
Member Avatar for venomxxl

Hello, I had no idea which title I should have chosen. Anyway, I'll try to explain my problem. What I'm trying to do is to prevent some code using functions in a header. This problem causes invulnerabilities in my application. I made a test program to show what exactly I'm …

Member Avatar for venomxxl
0
136
Member Avatar for mohan_198505

hi i m mohan sahu.i m using turbo c( borland compiler) and working with windows xp. i have one header file say myheader.h having only declarations of all functions and one myfunc.c file having only definitions of all function without main and i m including header file with #include "myheader.h" …

Member Avatar for ajay.krish123
0
161
Member Avatar for sciwizeh

Hello, I'm not sure that this shouldn't be in the Computer Science Board because it is mostly a theory question, but it is also implemented in C, so here it goes. I've been looking at some ways to make a modifiable array to hold geometric data for a simplistic 3D …

0
175
Member Avatar for Lord Prime

I'm moving from VB to C, I've learned about the basics of c upto using arrays. I'm self-studying & experimenting now how to display text files as databases. this is the code i use to display text files: [CODE] #include<stdio.h> int main() { FILE *f; char buf[100]; f = fopen("test.txt","r"); …

Member Avatar for Lord Prime
0
116
Member Avatar for arunprabhu.1

Hi all, I've a MAC address (ex- 00:06:cf:45:e5:d9) in a string format.Is there any way to convert this string to hex value, so that i can able to fill the MAC address structure ([B]struct ether_addr[/B]) thanx in advance

Member Avatar for Salem
0
42
Member Avatar for sotiris25s

i have exams tomorrow and i really really need someones help on my problem. here how it goes: "we have 100 students info such as surname,name,id and grades for 6 lessons for those students. the program must: - can take grades from 1 to 10 - can calculate and find …

Member Avatar for ajay.krish123
0
195

The End.