15,551 Topics
| |
THIS IS A CALCULATOR PROGRAM LIKE FOR EXAMPLE: 2+3*4 WHY DO I GET NULL RESULT? THE CONVERSION TO INFIX TO POSTFIX IS RIGHT BUT WHEN I EVALUATE THE RESULT IS NULL... PLEASE PLEASE HELP...T__T [code]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define MAX 100 typedef struct { char data[MAX]; … | |
Can u help me with this? Here's the problem. Everytime i input just 1 word...it works fine. [URL=http://img148.imageshack.us/i/26168475.jpg/][IMG]http://img148.imageshack.us/img148/2503/26168475.jpg[/IMG][/URL] but when i enter 2 words this will happen... [URL=http://img706.imageshack.us/i/49110093.jpg/][IMG]http://img706.imageshack.us/img706/6625/49110093.jpg[/IMG][/URL] [CODE]#include <stdio.h> struct Student{ char course[5]; char subject[5]; char name[20]; float units[8]; float grade[8]; float qpi[3]; }Stud[3]; int main() { float grade … | |
i have written small c language code to execute "dir" command which displays directories and files in the current directory, using system() function in c. But my code doesn't work. please help me. [CODE]# include <string.h> # include <stdio.h> # include <stdlib.h> void main() { clrscr(); system("dir"); getch(); }[/CODE] | |
i have here 2 program the first one #include<stdio.h> [CODE]#include<conio.h> #include<stdlib.h> #include<process.h> struct record{ char acc_name[6]; int pin; float bal; }; void main() { FILE *fp; struct record b; clrscr(); if((fp=open("accounts.dat","wt"))==0) { printf("Error"); exit(1); } printf("Enter account name:"); gets(b.acc_name); printf("Enter account pin:"); scanf("%d",&b.pin); printf("Enter balance:"); scanf("%f",&b.bal); fprintf(fp,"%s %d %.2f",b.acc_name,b.pin,b.bal); fclose(fp); … | |
Hi guys, I'm writing a program that can read the date and the time separately. The only function I knew is ctime but it reads both of them, so is there any functions that can reed the date as: month day, year and time as: hour::minute::second Thanks! | |
Hello, currently I'm working on my institute project. i've got some problem with me float data, when i enter the basic salary at the time of adding new employee, its not saving into my output file [data.txt] also not shown up when i search. also i got same problem in … | |
Here is my program so far: [CODE] #include <stdio.h> #include <string.h> #define max 200 typedef struct { char triple[6]; unsigned index; unsigned lower; unsigned upper; } mpn; unsigned load_MPN_table (mpn *mpn_table[], FILE* input, unsigned max_size) { unsigned i; for (i=0; i<max_size; i++) { fscanf(input, "%s%u%u%u", mpn_table[i]->triple, &mpn_table[i]->index, &mpn_table[i]->lower, &mpn_table[i]->upper); // … | |
C program to perform Matrix operations such as Addition, Subtraction, Multiplication and Transpose according to the user’s choice. displaying following menu. ------------------ MAIN MENU ------------------ 1. MATRIX ADDITION 2. MATRIX SUBTRACTION 3. MATRIX MLTIPLICATION 4. MATRIX TRANSPOSE 5. TO EXIT --------------------------- Please enter your option <1/2/3/4/5>: The program should ask … | |
I am running Windows 7 on one machine and Linux Debian on another. I am creating a C application using NetBeans. It seems to be working just find on Linux when I run it there. But when running on Windows, messes up the output somehow, kinda prints the output more … | |
my project requires an external header file which includes definitions etc.. but i have no idea about how to create a header file on dev c++ thanks for any help.. | |
I am tring to get this program together and can't seem to make it work. Ok. . this program is to take in a file with a matrix of zeros and numbers 1-9. The zeros are shaded and the numbers are part of a block. All numbers and the ones … | |
I seriously have no clue why it isn't working, it compiles but no luck getting any of the options to work besides input entry any suggestions will be so greatful![CODE]#include<stdio.h> #include<ctype.h> #include<string.h> #include<stdlib.h> #define NAME 30 #define ADDRESS 80 #define PHONE 11 #define EMAIL 50 #define SIZE 500 void Insert(); … | |
Hello all, I developed an application for revit architecture and converted it to a dll using C calling convention. But i can't load this dll into revit. Can anyone help? | |
[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int code; char name; float amount; int shares; float c_price; }DATA; typedef struct stockList { DATA stock; stockList* link; }STOCK; STOCK* insertStock(STOCK* pList, STOCK* pPre, DATA item); STOCK* buildList(char* fileID); void printList(STOCK* pList); void fprintList(STOCK* pList); bool searchList(STOCK* pList, STOCK** pPre, … | |
I tried to change for loop to do while loop so that I no need to control the value of i in the future. But seems my program crashes. [code] #include<stdio.h> #include<stdlib.h> struct stock { char code[10]; char name[10]; float amt; int held; float price; struct stock *next; }; int … | |
this is my code for a simple link list...i cant solve the problem of the while loop.it is only working for "1".and i cant swap two nodes in the list and cant insert nodes in a given position...how can i do those???plz help....[CODE]//Pirateâ„¢ #include<stdio.h> #include<string.h> #include<stdlib.h> struct list_element { char … | |
Hi, i didn't know whether to put this under C or Shell scripting so i chose this one. Well I am doing a piece of shell scripting and have written some code. and basically when i run it no prompt shows up so i cannot type commands like help or … | |
So i guess the titles says it all i m trying to create dynamic structure of adjacency lists and i m having some errors since i m a little new in C anyone mind taking a look at it and tell me of any mistakes i might be doing STRUCTURES … | |
sir i have no idea about the graphical work in c...bt i want to learn those things...how can i learn?????plz show me some way.. | |
Dear all, I have to use a funny structure in my code which has a 2D array and allocate it in the program. I do not know how to use malloc for that. This is the code: #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #define NUMBER_DECISION_VARIABLES (int)4 #define DIM … | |
what program will use with to problems.... write a program that will convert decimal to words... maximum exceed 3000. ex. 300= three hundred 32=thirty two 1002= one thousand two write a program that will convert a decimal to roman numeral.. maximum exceed 3000. 1= I 5= V 10=X | |
Hello, I'm writing some C code for a class, and as part of it, I'm dynamically creating two two-dimensional arrays. One of them is a dynamic array of dynamic arrays - so I know that to clean that up I need to loop through each array and use free() before … | |
I want to print each first character of a List of Array in upper case using C. For example, if I have Array of these elements char *d[] = {"water", "salt", "sugar", "milk", "soda"}; I want my function to print them like this Water Salt Sugar Milk Soda I will … | |
[CODE]/* Hello World for OpenGL */ #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> void drawing(void); /* This program will create a window with GLUT-library * that will remain open until it will be closed */ int main(int argc, char** argv) { glutInit(&argc, argv); /* initializarion of OpenGL library */ glutInitDisplayMode(GLUT_SINGLE | … | |
Hello I need yours help... I have an text file like this A (B) A B (C)[B](A) D D (A) C D (A)[B](D) C Some letters are A , others are (A) and other [A]. I need to read it 3 by 3 chars at each time and put it … | |
Inside a C function, if I declare something like [icode]char *s = "Hello";[/icode] Where will the memory for the "Hello" string be allocated? Will it be on the stack or the heap? If it is on the heap, will there be any problem if I return the address of that … | |
hello guys.... can you help me with this one.....? can you give me a syntax for this ....? 1(2)+2(2)+3(2)+4(2)=36 | |
I have an assignment that involves steganography. We have to read in a header of the picture file and all of its binary content and then modify certain parts of it. I'm having issues with reading in the header of a .ppm files which is written like this: P6 #comment … | |
I'm having trouble building in a pipe, i have program reads in from argv using fgets spilts up using strtok into command,cmd and cmd2. then i have a if statement [code] if(strcmp(cmd, "|")==0) [/code] then i open the file for writing [code] strcmp(filename, cmd2); file2=open(filename, O_WRONLY); [/code] now im confussed … | |
i m doing a project in operating system lab. i hav chose atm machine stimulation. i have a coding to access floppy as atm card but i find difficult to access it. so thought to access using cd .[B] is ter any possibility to access cd using c program??? [/B][U]pls … |
The End.