15,550 Topics

Member Avatar for
Member Avatar for logicmonster

I'm having a problem parsing information stored in the buffer after a getline command. I have a file with data in the format: [ICODE]1310 76102 C 5 27 2011 6 26 2011 5 R R 8.00 20.00 F R 8.00 25.00 150 165[/ICODE] I would separate everything using white space …

Member Avatar for WaltP
0
146
Member Avatar for logicmonster

I'm trying to figure out a way to create a loop to open files and read in data until either there are no more files or the user wants to stop. for example, the first time through the loop, the string variable would be "myfile_1" and then each subsequent time …

Member Avatar for logicmonster
0
455
Member Avatar for sydsine

how to addres sparse matrix n*n dimension when stored in a single dimensional array.

Member Avatar for sydsine
0
100
Member Avatar for kooletz

Please help me on my bloodshed 9.4.4.2 assignment, i need to create a program that will view the name and salary. i already created 1 program but in converting Km to mile and the time of the destination when reach.. here are i need to input and to be an …

Member Avatar for YAMNA MIDHAT
0
147
Member Avatar for theCompiler

im creating a simple game and i want it to have continous 10 rounds . but i dont have any idea , im not allowed to use looping .tnx

Member Avatar for sergent
0
281
Member Avatar for raj.sokkalingam

I am a new learner of c. I am trying to code a car game .I have some problems in it . In this,the car is moving separately according to the input .The random cars are generated.I am not able to combine both the functions simultaneously. could any one help …

Member Avatar for sergent
0
155
Member Avatar for Eternal49

Im working on a program and one of the functions writes data to a socket. Everything is working except one part that Im having trouble figuring out. If I create a variable and assign a hex value to it inside the program everything works. (e.g. char variable[] = '\xff\xff\xff\xff\xff'). But …

Member Avatar for WaltP
0
594
Member Avatar for wildplace

i used one register in my inline asm. when i compare the asm codes with and without clobber, i dont see any different between them. so, what exactly does clobber do?

Member Avatar for thines01
0
101
Member Avatar for ZIA_JAPPA125

Hello everyone this is the correct ans for your problem....this program is working propely but but int thing is that i can't solve is that the decimal number range between 1 to 7. if any character in my number will increase from 7 thou it shuold give output the number …

Member Avatar for Adak
0
139
Member Avatar for Falcon143

Hi friends, Please suggest me how to display the line number in C program. without using predefined macros, or windows library files.

Member Avatar for nmaillet
0
2K
Member Avatar for danieldane

Hello there, My teacher in programming require to make a phone book style using C language and I almost done this project and I trying to sort up some minor problems. Would somebody our there help me? (please try to run this program by your own to see what I …

Member Avatar for rubberman
0
199
Member Avatar for gman1991

[CODE]// this is program designed to create Cd data base #include <stdio.h> #include <string.h> #include <stdlib.h> //============================================= //LINKED LIST USED FOR CREATING THE DATABASE CD //============================================= struct CD_type_node { int CDnum; char title[20]; int CDcount; struct CD_type_node* next; }; struct Artist_type_node // to create a linked list of CD's { …

Member Avatar for WaltP
0
121
Member Avatar for poojavit

I want information on how to start basics of image processing through C language.

Member Avatar for Adak
-1
116
Member Avatar for emmas4impact

Hello, I am writing an application which i need to use the date function and i dont know how to implement it. I wanted the date to be ask from user and be stored in a text file. anyone with hints i can really use some help. Thanks.

Member Avatar for Narue
0
150
Member Avatar for keshvari

Hello I am trying to write a matrix calculator but I have some problems.I use cofactor method for calculation.If you don't know the this method you can learn it here easily: [URL="http://paulbourke.net/miscellaneous/determinant/"]http://paulbourke.net/miscellaneous/determinant/[/URL] I use two function 1- GetMinor() 2- matrixCofactor() that the first one give me the minor matrix and …

Member Avatar for keshvari
0
1K
Member Avatar for Prankmore

I am trying to take a user input phone number and perform calculations on it as an integer of type long long. I've tried this but it only reads the first 3 numbers then when it reaches the hyphen it stops. [CODE=C] printf("Enter Number: \n"); //get input from user count …

Member Avatar for Prankmore
0
3K
Member Avatar for kiranbhatter

Hi, As I want in my program to enable dynamic vertical scroll bar, i would like to use WM_VSCROLL inside WM_PAINT. Let me explain my situation. As soon as the user hits any key. On output window i am displaying as "key pressed <key>" and then i m moving to …

0
84
Member Avatar for menonnik

How can we find a sub array in a 1-D array? Is there any other method other than brute force method? It is not for maximum sum so we can't use kadane's algorithm.

Member Avatar for menonnik
0
234
Member Avatar for keevin

Write a global function called format, which formats numbers with a given number of decimal places. The function accepts a compulsory first argument of type double (the number to be formatted) and a second optional argument of type integer (the number of decimal places) and returns a string object containing …

Member Avatar for basrikul
0
433
Member Avatar for theCompiler

i dont know how to random select a word in c . a big help is highly appreciated .. tnx :) for example the words are Ana,Lorie and Denise . how to random select from those words ?

Member Avatar for theCompiler
0
175
Member Avatar for emmas4impact

I have a customer record which i wish to modify so i wrote the following to modify it but each time i typed the name i want to modify it will not modify and prints not found! [CODE]void modify(){ char another='y',choice,name[25],flag='n'; long id; do { //clrscr(); //rewind(fc); printf("SEARCH BY NAME …

Member Avatar for WaltP
0
129
Member Avatar for apanimesh061

How can one demonstrate Multiprogramming and Idle loop in C ??? Please help !!! I can't think any way ..... :?: Thanks

Member Avatar for Narue
0
217
Member Avatar for tubby123

Guys, this is the code from KnR I dont understand this line nunits = (nbytes+sizeof(Header)-1)/sizeof(header) + 1; The entire code is as follows [CODE]static Header base; /* empty list to get started */ static Header *freep = NULL; /* start of free list */ /* malloc: general-purpose storage allocator */ …

Member Avatar for rubberman
0
130
Member Avatar for shanki himanshu

the question of the program i have posted... There are N numbers a[0],a[1]..a[N - 1]. Initally all are 0. You have to perform two types of operations : 1) Increase the numbers between indices A and B by 1. This is represented by the command "0 A B" 2) Answer …

Member Avatar for shanki himanshu
0
174
Member Avatar for algotycoon

Hi all I want to make character pascal using strings in c just like SOFTWARE S SO SOF SOFT SOFTW SOFTWA SOFTWAR SOFTWARE plz help me how to make this type of ????

Member Avatar for Muralidharan.E
-3
143
Member Avatar for missil9

Hello. I have been kicking myself for a while now and I was wondering if anyone could please help me. My code is: [CODE]char fname[FNAME_LEN] = "blah" FILE * fp = fopen(fname, "r"); char line[BUF_LEN]; while( fscanf(fp, "%s", line) != EOF ) { double x = atof(strtok(line, "|") ); unsigned …

Member Avatar for missil9
0
296
Member Avatar for emmas4impact

[CODE]void Addcostumer(){ struct CustomerData *p; char another ='y'; char anothers ='n'; CustomerData *newcous; char str1[80]; char str2[100]; char str3[20]; //fseek(fc,0,SEEK_END); p=(struct CustomerData *)malloc(sizeof(struct CustomerData)); newcous= new CustomerData; printf("Costumer Name:"); fflush(stdin); gets_s(str1); strcpy_s(newcous->CName,str1); printf("Costumer Address:"); fflush(stdin); gets_s(str2); strcpy_s(newcous->Address,str2); printf("Costumer Puhelin:"); fflush(stdin); gets_s(str3); strcpy_s(newcous->Puhelin,str3); if ((fc = fopen("c:\\users\\Emmas4impact\\Documents\\customer.bin", "wb"))==NULL) { printf("Cannot open …

Member Avatar for emmas4impact
0
158
Member Avatar for nishajain

[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); cout<<"Let initial states be 0 0\n"; int Q0,Q1,D0,D1; Q0=0; Q1=0; cout<<Q0<<"\t"<<Q1; int Dff(int clk,int D) { int Q; if((D==0||D==1)&&clk==1) { Q=D; return(Q); } } int NOR(int a,int b) { int out; if(a==0&&b==0) { out=1; return(out); } if(a==1||b==1) { out=0; return(out); } } do { …

Member Avatar for m4ster_r0shi
-1
144
Member Avatar for Prankmore

[CODE]# include<stdio.h> # include<string.h> int main(int argc, char **argv){ char phone[16]; int num = 0; int count = 0; printf("Enter a phone number: "); count = scanf ( "%s%n", phone, num ); memmove(phone + 3, phone + 2, 10); memset(phone + 3, '-', 1); memmove(phone + 7, phone + 6, …

Member Avatar for Prankmore
0
177
Member Avatar for theCompiler

I am confused as to where Am I supposed to assigned a variable . my code goes like this [CODE]char text[]= "FRUITS"; printf("Enter between apple,orange or mango"); gets(text);[/CODE] I want to assign a variable "User_select" to that printf part .

Member Avatar for TrustyTony
0
84

The End.