15,547 Topics

Member Avatar for
Member Avatar for driplet

Hi there: I am trying to output a single variable to a binary file, but couldn't get it done correctly. [code] result = 17.0; if ((OutFp1 = fopen("myfile.bin", "wb")) == NULL) { Application->MessageBox("File can't open.", NULL, IDOK); return; } fwrite(&result,sizeof(result), 1, OutFp1); fclose(OutFp1); if ((InFp15 = fopen("myfile.bin", "rb")) == NULL) …

Member Avatar for driplet
0
116
Member Avatar for abhijithda

How does "\b" and "\n" work together when they are placed next to each other in printf. For ex: Printf("\naa\b\n") The solution is "aa". I was wondering if anyone could explain me how/where "\n" is placed. Does the occurence of "\n" just makes the file pointer to transfer to the …

Member Avatar for jephthah
0
242
Member Avatar for J-son

Can anybody help me to solve this problem? My program doesn't work as what it is required. Here is the question and my program code. Thanks. [CODE=c] /**Twenty-five numbers are entered from the keyboard into an array. Write a program to find out how many of them are positive, how …

Member Avatar for J-son
0
109
Member Avatar for awi123

program to display 10 multiples of a number [code=c] #include<stdio.h> main() { int m,n,o; m=5; for(n=0;n<11;n=n+1) o=m*n; printf("Multiples are %d",o); }[/code]

Member Avatar for Aia
0
108
Member Avatar for thirtan

can anyone please help me write a program to find the size of primitve datatypes in a particular complier and display the same on the screen.

Member Avatar for thirtan
0
90
Member Avatar for amarhp

Hi all, I have one question regarding pointers.. suppose..I've one pointer tht points to block of data[RAW data - may be sound file]. and i want to copy this data to another location which pointed by another pointer. so plz show me the way ..how to do tht.

Member Avatar for Radical Edward
0
81
Member Avatar for somename

Hi guys. I cannot figure out how to do next thing. for example i have a little progie like this: [CODE]int myfunction(int argc, char *argv[]){ int i; for(i=0;i<argc;i++) unlink(argv[i]); } int main(int argc, char *argv[]){ myfunction(argc,argv); }[/CODE] works fine, but i'm trying to do that: [CODE]int myfunction(int argc, char *argv[]){ …

Member Avatar for LouPascalou
0
95
Member Avatar for champnim

Can anybody please give me a link for a program to convert a PDU string to ASCII? Thanks in advance.

Member Avatar for champnim
0
118
Member Avatar for paolomontero

Hi, I'm using Turbo C 2.01 and im stuck with this problem. I've reduced it to the following. My code in Turbo C is this: [CODE=C] void f(char *); char h[] = "hello"; void main() { f(h); } void f(char *s) { int n = 0; while (s[n] != 0) …

Member Avatar for paolomontero
0
198
Member Avatar for champnim

I have a string of the form "abcd\"1234\"efgh". I want to extract 1234 from this string. How should I do this?

Member Avatar for WaltP
0
197
Member Avatar for Crushyerbones

Hello, sorry to ask, but does anyone know any working algorithms for quicksorting a doubly linked list? I'm only asking because I'm going to rip someone's head off if I have to keep doing it by myself any longer :P Don't worry, I understand how to it on my own, …

Member Avatar for Crushyerbones
0
61
Member Avatar for Borgatto

Hello. I need to create a C application and i have to use a status bar. I think i can use MFC, but i don't know how to start. Can anyone help me? Thanks.

Member Avatar for Borgatto
0
107
Member Avatar for rajkiran718

CAN any one help me writing a C Program I need to send a Http request to Http audio streaming server get connect if server requires authentication (then again send user name and password) if authentication is OK get the audio stream downloaded on to a folder Else If server …

Member Avatar for stephen84s
0
106
Member Avatar for Utter_iMADNESS

Hi everyone. I'm making a simple text rpg and battle system with C and I was just wondering if it was possible to add sounds to it. I've heard that it's possible with C++ but I'm not sure if it's possible with C as well. Any help is greatly appreciated …

Member Avatar for jantazone
0
157
Member Avatar for bobraj

hi all, i am new to programming, my problem is that after certain data manipulation i will a array which will have only zeros & ones. (example x[5]={0,0,1,0,1} now i would like to store the contents of the array in another variable like A(say)=00101. but the codes which i written …

Member Avatar for bobraj
0
93
Member Avatar for zebanaqvi

When a language is created, then i think is the interpreter or compiler written. But how are the linked at the hardware level? How is a language understood by the machine? can anyone see the code in which C is written?

Member Avatar for Ancient Dragon
0
58
Member Avatar for narendharg

Hello, I would request you to give some information regarding FLOAT CODE. With Regards Narendhar.G

Member Avatar for Aia
0
130
Member Avatar for fddrummer06

I am currently taking a class in C online and I have a homework assignment to create a random sentence generator with arrays of specific words. I have the random part working, but I am unsure as to how to capitalize the first letter of the first word in the …

Member Avatar for jephthah
0
779
Member Avatar for LightSystem

I have a simple question. Is it possible for a C variable to have a user-defined name? Imagine this: I have a function lets call it: create_new It receives a string, lets call it: name[ ] So the function looks like this: [B]char create_new(char name[ ])[/B] My question is, can …

Member Avatar for Salem
0
73
Member Avatar for achandra

hi, can anyone please tell me which is better in #include<stdio.h> and #include"stdio.h" and why? bye chandra

Member Avatar for jephthah
0
61
Member Avatar for hazmatt

I found some open source code written in C that does most of what I want for a project and am having some trouble making the modifications I need. I am hoping the solution will help me better understand pointers and memory allocation as well. The original code takes in …

Member Avatar for hazmatt
0
119
Member Avatar for dr4g

Hi there. All mail sent through the SMTP server, i need to modify the message being sent through. I thought of making either a C,bash,perl script to take in the message, modify it and return it to SMTP, or stop the SMTP process, and re-call it from the script. Purpose …

Member Avatar for Salem
0
100
Member Avatar for mrynit

I am trying to modify code for a usb thermometer prob for linux. I have the source code and the makefile used to compile. When i use make to compile, it will compile and work just fine no problem. I am trying to setup eclipse so i can modify the …

Member Avatar for jephthah
0
250
Member Avatar for carobee

hi all i am using VC++ editor. Can anyone tell me how to insert sleep in my program? i have tried sleep(). but it is giving an warning 'sleep' undefined; assuming extern returning int. Thanks in advance

Member Avatar for Colin Mac
0
138
Member Avatar for J-son

[CODE=C] /** calculate the value of 'a' raised to 'b'.**/ #include <stdio.h> int main (){ int a,b,calc,calculation; printf("Enter value of a and b\n"); scanf("%d %d",&a,&b); calculation=1; for(calc=1;calc<=b;calc++) { calculation=calculation*a; } printf("%d raised to %d is %d",a,b,calculation); return 0; } [/CODE] My problem is I don't understand how this part " …

Member Avatar for J-son
0
100
Member Avatar for champnim

I want to access my mobile phone,connected through its USB cable, from a C program to send AT commands to it.Can sumbody pls help me

Member Avatar for champnim
0
171
Member Avatar for tejapedada

Hi all, using C language we can read text files. we can read each and every character. ch =fgetc(filepointer); but i want to know how to read folders. for ex: fopen("c:\one foldername", "r"); in out put i want print subfolders and files. if any body know please help me... thanks …

Member Avatar for WaltP
0
111
Member Avatar for rob_xx17

hello, I have a rather old system, running Red Hat 5, and I need to write a program that, among other things, imports data from an external file(s) and writes it into array(s); the following is the format of my external data file (obviously it's much larger): [code] 2.59 3.17 …

Member Avatar for Salem
0
98
Member Avatar for dangana

This code i've written keeps showing an error "constant expression expected in function main". I'm not sure if the code i've written is on track. [code] #include<stdio.h> #include<math.h> #define MULTIPLY 1 int i,n; int operation; int Answer = 1; int main() { printf("You are welcome\n"); printf(" how many numbers do …

Member Avatar for jephthah
0
121
Member Avatar for Crushyerbones

Hi, I've been trying to analyze the source code to some applications but so far I've been unable to figure out how to receive user input while the program is of doing something else. My program consists of a small list of items which are being constantly sorted. The problem …

Member Avatar for Duoas
0
180

The End.