19,876 Topics

Member Avatar for
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
267
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
112
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
113
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
92
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
84
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
100
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
126
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
232
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
283
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
65
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
110
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
111
Member Avatar for SwathiSangral

Hello, I have a sample code which is a header file and I am trying to write a CPP program which uses this file. But I am getting errors while running the code. Here is the header file: #ifndef FineInterfacePtr_h #define FineInterfacePtr_h template<class T> class CSafePtr { public: CSafePtr( T* …

Member Avatar for Radical Edward
0
126
Member Avatar for Spiegel

Hi people I'm pretty new to this and I was wondering what c# code you would put into the button event handler to allow the person who presses it to browse for an excel file then use that data to populate the sql database that you can make using visio …

0
52
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
163
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
125
Member Avatar for jks1234

Write a program that will prompt the user for a purchase amount. If this bill amount is valid, then prompt the user again for the payment amount. If this is valid then compute the change to be returned. This amount should be displayed in pennies, nickels, dimes, quarters, single dollar …

Member Avatar for Ancient Dragon
0
104
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
62
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
133
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
785
Member Avatar for gctarzana

Hello , I'm having trouble with a C++ assignment. We're supposed to create an inventory program for keeping track of books, CDs and DVDs. We are supposed to use an abstract class InventoryItem, and classes Book, CD, DVD. Also a class Inventory will contain all the functions needed to enter …

Member Avatar for Sky Diploma
0
2K
Member Avatar for Frazinray

Hi guys I'm a fairly lightweight (in virtual world only, sigh) hobbyist who finds programming fascinating. I enjoyed teaching myself C++on my old machines. Bloodshed Dev C++ I found particularly robust and reasonably forgiving in older Windows OS. We recently switched to Linux for most of our machines and I …

Member Avatar for Ancient Dragon
0
105
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
77
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
64
Member Avatar for farooqsam
Member Avatar for Jx_Man
0
49
Member Avatar for merkuries

It's my revision question. Please help... Create a Class Employee. This class holds member variables: employee number and salary. It has an array of 4 employees and includes 4 employee number and salary. Has 2 member functions: Get() employee detail, namely number and salary Display() employee detail Create main() I'm …

Member Avatar for merkuries
0
172
Member Avatar for bravefanwill

How do you write a C++ program that converts uppercase letters to lowercase using the following function header: char upperCaseToLowerCase(char ch)

Member Avatar for Ancient Dragon
0
40
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
129
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
103
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
260
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
144
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
104
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
177
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
113
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
102
Member Avatar for slacke

I need to write a small program which collects (20-36 string) data from several com (serial ports) and sends them out on one. For example com2,3,4 to com1. It should be on Windows Xp workstation. (It is possible that I will do it later on linux, it seems to me …

Member Avatar for Ancient Dragon
0
357
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
142
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
192
Member Avatar for SonxQ7

why is this giving a syntax error? [code] int function ( int x) { x ? return 1 : return 0; } error C2059: syntax error : 'return' [/code]

Member Avatar for jephthah
0
165
Member Avatar for sjgriffiths

Hello I have a list of data, which looks something like below www.clickajob.co.uk%2Fprofiles%2F316%2F6%2F|a/TLT10911641168.google www.ukdata.com%2Fcompany-listings%2FAd-16.html|a/TLT10911767856.google I need to parse this data so i am left with www.clickajob.co.uk|TLT10911641168.google www.ukdata.com|TLT10911767856.google Does anyone know how to help me? I have the following so far [ICODE] if ( fp == NULL ) { printf("Error opening …

Member Avatar for Ancient Dragon
0
82
Member Avatar for skeeter5040

hello i got this error and tried to unistall it and reinstall it and still no luck here are my specs ...Can Anyone help me please!!!!!!!!!!!!!!! System Security Status CIS Benchmark Score Available only for Windows 2000, XP Pro, and 2003 Virus Protection Up-to-date Microsoft Security Updates Up-to-date -------------------------------------------------------------------------------- Computer …

Member Avatar for Laser
0
226
Member Avatar for somename

Hi. i'm trying to copy a binary already with a predefined permissions. I got this code: [CODE] FILE *f1, *f2; char cp; f1 = fopen("file1","rb"); f2 = fopen("file2","wb"); while(!feof(f1)) { cp = fgetc(f1); if(!feof(f1)) fputc(cp, f2); fclose(f1); fclose(f2);[/CODE] but this just copy a file. But what i'm trying to do …

Member Avatar for somename
0
131
Member Avatar for joytech22

when i was playing C&C 3, the game Hung causing me to try and end the process. the same happens in Colin Mcrae DiRT. im running Windows XP GPU:Nvidia Geforce 9800GTX 512MB! CPU:Amd Athlon X2 5200+ (2.7GHz ea core!) MOBO:Gigiabyte S-series PSU:codegen 530W RAM:1.7gb

Member Avatar for disophisis
0
97
Member Avatar for booly_joon

Hi I have been pulling my hair out trying to figure this out. Please help!!! Here is my project description: By using a pointer to pointers **A and **B and the function calloc() allocate the memory for the 4x4 matrices A[][] and B[][]. By using the pointers *a and *b …

Member Avatar for Ancient Dragon
0
80
Member Avatar for mm-marek

Hi, I need to transfer data from file to fields... Can anyone help me? file: [CODE] name surname weight age male/female name surname weight age male/female marek mixa 70 23 M ... [/CODE] kód: [code] typedef struct lidi { char cl_jmeno[16], cl_prijmeni[21], cl_muz_zena[1],cl_vyska[3], cl_vaha[3]; } LIDI; LIDI lidi[6]; [/code] i …

0
78
Member Avatar for dobado

i need a prog to find the num of solution possible for n queen can anyone help???? waitin 4 a reply as soon as possible...... thx...

Member Avatar for tesuji
0
126
Member Avatar for Clockowl

Hey, When quick googling didn't really clarify, I'd like to ask here. When declaring an N-dimensional array, 2D in this case, how to set them all to zero? For 1D arrays it should work with type name[n] = {0}; Is the same approach also guaranteed to work for N-Dimensional arrays …

Member Avatar for Salem
0
273
Member Avatar for virgilio

Hi I'm now into data structures: this is the problem: string s = "abcdef" char[] mychar = string.TocharArray(); int Length = s.length; StringBuilder sb = new StringBuilder(Length); -------Basically I need to construt a new string with the last two character iterated twice if the string = the same string. does …

Member Avatar for chsarp_vijay
0
89
Member Avatar for MiTiM

I'm trying to read two data (different types) from binary file (First I had written these data in it). I have problem with output. it's really unexpected: 0.000000000000000000000000 and 10000. Where's the problem in reading double data type? (OS: win xp; compiler tc 3.0; similar result i get with Visual …

Member Avatar for MiTiM
0
2K
Member Avatar for ~bleach~

parser for c language help me -------------------------------------------------------------------------------- i want parser in language i have grammer is that SS->AAaBBb AA->a|b BB->aAA this a letter for language a ,b [code=cplusplus] int lexan() { int lookahead; lookahead=getchar(); return t; } int match(int t) { if(lookahead==t) lookahead=lexan(); else error(); return lookahead; } void error() …

Member Avatar for Duoas
0
135

The End.