15,551 Topics
| |
Howdy! So I'm taking this online intro to C class and have not been able to get in touch with my instructor because I think he's on vacation.Grrrrr. Anyway, If someone could give me some hints on what is wrong with this code I would really appreciate it. I am … | |
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 … | |
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 … | |
how to addres sparse matrix n*n dimension when stored in a single dimensional array. | |
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 … | |
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 | |
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 … | |
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 … | |
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? | |
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 … | |
Hi friends, Please suggest me how to display the line number in C program. without using predefined macros, or windows library files. | |
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 … | |
[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 { … | |
I want information on how to start basics of image processing through C language. | |
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. | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 ? | |
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 … | |
How can one demonstrate Multiprogramming and Idle loop in C ??? Please help !!! I can't think any way ..... :?: Thanks | |
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 */ … | |
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 … | |
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 ???? | |
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 … | |
[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 … | |
[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 { … | |
[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, … |
The End.