15,548 Topics

Member Avatar for
Member Avatar for N1GHTS

What do you guys think is a good way to deal with this situation: [code] #define TYPE_INT 0 // 4 byte, signed #define TYPE_CHAR 1 // 1 byte, signed #define TYPE_UINT 2 // 4 byte, unsigned #define TYPE_FLOAT 3 // 4 byte, signed, floating point typedef struct { float Value; …

Member Avatar for N1GHTS
0
109
Member Avatar for harris21

i have a XML file containing data, i want to parse it in c. can you help me out in parsing.

Member Avatar for N1GHTS
0
2K
Member Avatar for tomtetlaw

Can someone give me an example of how to use the ToAscii functions to convers windows virtual key codes to ascii characters? I've tried to search on google, but I can't find an example..

Member Avatar for Ancient Dragon
0
186
Member Avatar for PeterX

Hi! I want to learn C language. my question is: how dose this while loop wok. [code] while((c=getChar()) !=EOF) if(c>'0' && c<'9') nbr++; [/code] How EOF(end of file ) works? EOF=-1; How can I stop the program? when I write (-1) I can not stop the program.

Member Avatar for N1GHTS
0
253
Member Avatar for falconwise

I am getting the following errors. ../MergeSort.c:32: error: expected expression before ‘]’ token ../MergeSort.c:33: error: expected expression before ‘]’ token [CODE]void mergesortinplace (int start, int length, int array[]){ if (length >= 2){ mergesortinplace(0, (length/2), array[]); /*GETTING ERROR HERE*/ mergesortinplace((length - (length/2)), length, array[]); /*AND HERE*/ } if (length >= 1){ …

Member Avatar for falconwise
0
215
Member Avatar for tomtetlaw

What is the windows api virtual keycode for the ` key(the one next to the 1 key), i can't seem to find it anywhere on google or msdn.

Member Avatar for N1GHTS
0
89
Member Avatar for Rushabh Shah

How Would i connect my C programe With SQL PLUS ???????/ IS there any header file i hv 2 study???? or any other solution??? i want 2 make a program which is user friendly who dont know the SQL bt by this programe they can easily manage the database..... plz …

Member Avatar for N1GHTS
0
95
Member Avatar for Firestone

My compiler won't pause on getchar();. I have Dev C++ 4.9.9.2 and if I put getchar(); at the end of the program, it doesn't stop, and the console window still exits. It still exits when I assign a variable to it c = getchar(); Is there another way to pause …

Member Avatar for Narue
0
2K
Member Avatar for tomtetlaw

When I run this code, the variable s has MZ as the first 2 characters, I never put them there, I don't know how they got there. I think it might have something to do with strcat, does strcat modify the source paramater at all? [code=c]void Con_Draw() { int i; …

Member Avatar for Narue
0
166
Member Avatar for Iam3R

[CODE] #include<stdio.h> #include<stdlib.h> #define MAX 5 char queue[MAX][30]; int front, rear, temp; void init() { front = -1; rear = -1; } void insert() { if ( rear >= MAX-1 && front == -1 ) { printf("\nQueue overflow"); return ; } temp = rear; rear = ( rear + 1 …

Member Avatar for tirath9792
0
262
Member Avatar for MKDWOLF
Member Avatar for tomtetlaw

Okay, I have a problem. In this code, after the first call to strtok, the variable becomes "developer" when it was originally "developer;developer 0;developer". I would have expected it to become "developer 0;developer" after the first call.. [code=c]void Con_Execute(char *text) { char *pch; char string[10240]; strcpy(string,text); if(!strstr(string,";")) { Cmd_ExecuteString(string); return; …

Member Avatar for tomtetlaw
0
84
Member Avatar for harikrishna439

I get a warning message while executing a C program containg 'gets'.Is there any way to avoid this.Currently I am using ubuntu OS>

Member Avatar for gerard4143
0
108
Member Avatar for gurushankar

hi all, Im a beginner in C. Can you please help me in explaining the function of ## in the below program. #define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); } what does #define f(g,g2) g##g2 mean?

Member Avatar for gurushankar
0
100
Member Avatar for varun mca

[B]Hello sir.. I want to know that if there is any difference between Parameter and Argument of a function[/B]....?

Member Avatar for creeps
0
117
Member Avatar for varun mca

[B]hello sir.. I am not being able to make a program that accepts any number and displays it in words.... for example: when user enter 3456 then output should be three thousand four hundred fifty six.... 12 then print twelve.....9 then print nine...and so on....[/B]

Member Avatar for varun mca
0
88
Member Avatar for Rastabot

Hello, I'm trying to make a program that will multiply 2 matrices using shmget() and fork(). For example, I would need to multiply a 64 x 64 matrix using 4 processes or 16 processes, and the multi-processes will be created using fork. Each process will calculate a partition of the …

Member Avatar for sree_ec
0
1K
Member Avatar for litsluv

Ok, Here is the problem in the book; You are developing a database of measured meteorological data for use in weather and climate research. Define a structure type measured_data_t (which I have done) with components site_id_num (a four digit integer), wind_speed, day_of_month, and temperature. Each site measures its data daily, …

Member Avatar for Adak
0
198
Member Avatar for king chandel

Can windows programming be implemented on turbo c.If it can be then please tell me how.. advanced thanx to all

Member Avatar for Adak
0
132
Member Avatar for marygloria

hi guys, i have a few questions which is actually my assignments, but i'm still confuse about stack and implementations using pointers in C. this is the questions: 1. write a function to find if the stack is empty or not. 2. write a function to find the number of …

Member Avatar for Narue
0
246
Member Avatar for guru_iyer

I have been told to sort an array of structure(student) depending on one of its members(per) using bubble sort. I need to sort the 'student' structure in descending order of 'per'. Please help. I'm stuck!! [CODE] #include<stdio.h> #include<conio.h> struct student { char sname[20],dept[25]; int rollno; float per; }s[30]; void accept(int …

Member Avatar for guru_iyer
0
932
Member Avatar for DocRocks

Hello all, I am a beginner in C programming and have come up on a problem. I need to create 4 functions, 3 of the functions will get the users input (the 3 inputs will be the length of the sides of a triangle) and 1 function will be displaying …

Member Avatar for Adak
0
118
Member Avatar for WHITE_BOLT

Help me with this project?: You will create a login system that allows a user to access his/her account. A successful login is defined when both the login and password match. Once a successful login occurs, the program should welcome the user by using their Employee ID. Eg. Welcome Employee …

Member Avatar for Adak
0
117
Member Avatar for widapol

Hi all, I'm learning socket programming in Unix. My jobs is sending some frames over TCP/IP Client-Server model, ex Hello, Ack, Bye packets. Each frames have a ID field, which helps we know which packet the server/client received. For example, 1 for Hello, 2 for Ack and 3 for Bye. …

Member Avatar for widapol
0
623
Member Avatar for iwanttolearnc

what my code does is it waits for the user to type in "led" and performs the blink function. what i am trying to do is introduce the letter 'p' as a command to stop the blinking. what happens is that blink is only executed once. [CODE]if (!(strcmp(userinput, led))){ //condition …

Member Avatar for iwanttolearnc
0
113
Member Avatar for bdv

i have a problem,,here in turbo c i don't know if what kind of loop i will use can you please help me with this problem?? "write a program that accepts ordinary number and outputs,the equivalent in roman numerals" 1------I 5------V 10-----X 50-----L 100----C 500----D 1000---M 1500---MD Until 3000 Only

Member Avatar for CrazyDieter
0
82
Member Avatar for DoEds

Can anyone give me some ideas on how to find the middle value between 3 numbers.? I really dont know how to start... I know how find minimum and maximum but finding the Middle value is kinda hard for me... For those C Wizards give me some idea advice please?., …

Member Avatar for krutarth
0
3K
Member Avatar for JMoh

How can my program search for strings that has " " enclosing it and compare it to another string? Thanks for helping me!

Member Avatar for Adak
0
160
Member Avatar for gavindoc

Hello, I am learning C by reading the second edition of "The C Programming Language" by K&R but am struggling to understand this bit of code on page 145: [code=c] struct nlist *np; if ((np = lookup(name)) == NULL){ np = (struct nlist *) malloc(sizeof(*np)); ..... } [/code] Lookup returns …

Member Avatar for Ancient Dragon
0
193
Member Avatar for sakthi@daniweb

[code=c] #include<stdio.h> #define scanf "%s is char" main() { printf(scanf,scanf); } [/code] the output is %s is char is char y it is so..

Member Avatar for planetmirchi
0
166

The End.