18,491 Topics

Member Avatar for
Member Avatar for kde

How can I do it - with pointer and only one loop ? for exmpl function - unsigned int dif(const char *str) [CODE] counter = 0; for(i = 0; i < N; i++) A[i] = 0; do { A[tmp % 10]++; tmp /= 10; } while(tmp); for(i = 0; i …

Member Avatar for gerard4143
0
115
Member Avatar for cthoes

[below structure contains s1[i].name contain array of string name. to check if user entered name in that array list. i need to compare words by words. but my problem is that since string is stored in array. and string itself is an small array. so i dont know how can …

Member Avatar for cthoes
0
189
Member Avatar for er.imran2006

Want to merge multiple text file items into a single text Please give code Thanks in advance Imran Ahmed <EMAIL SNIPPED>

Member Avatar for peter_budo
0
121
Member Avatar for Pamilerin

Please I have a little problem with my project. It goes "A polynomial of degree n is represented as Pn(x)=A0 + a1x + a2x^2 + … + anx^n Where a0, a1, a2, a3 , … , an are constant coefficients. Evaluation of such polynomials may be important if Pn(x) is …

Member Avatar for vinodxx
0
131
Member Avatar for kde

how can i do it with one loop? [code] void printMat(const int mat[][N], int n) { int i, j; for(i = 0; i < n; i++) { for(j = 0; j < N; j++) printf("%3d ", mat[i][j]); puts(""); } }[/code]

Member Avatar for jonsca
0
119
Member Avatar for marirs07

i've done a c program which involves creating and updating of files,i'd like to run my exe online,and moreover i want my files to be updated automatically after i work on that exe ,is there any way to do this.Plz Reply Soon.Thanks in advance.....

Member Avatar for restrictment
-2
92
Member Avatar for xouy

Hello, I'm quite new to C programming, the code below tries to print the last 10 lines of a file, My problem is in the last part of the function tail_file() : strcat(tail, character); i'm reading the file character by character, but i want to return a string containing all …

0
60
Member Avatar for shadwickman

Hello! I have a question in regards to [I]malloc[/I]/[I]calloc[/I] and [I]free[/I] in C. What I'm unsure about is the "depth" (for lack of a better word) that [I]free[/I] operates to. I know that sounds strange so let this example hopefully explain what I mean: [code=c] #include <stdlib.h> int main () …

Member Avatar for shadwickman
0
135
Member Avatar for sakina azhra

......................... please helpe me : i can't write a program ??????? consider the following list of countiers and capital : Canada Ottawa England London India New delhi Italy Roma Japan Tokyo Mexcico Mexico city Chaina Beijing United state washington Russia Moscow Germany Brlin write c programming that will accept the …

Member Avatar for Dany_08
-4
97
Member Avatar for tkud

Hey everyone, since nobody has decided to assist me in my problems, I guess I have to throw it at you guys this way: I am using Visual C++ 2008 Express edition, I have a win32 tutorial that I'm using, and I'm saving my files as .cpp. However, the codes …

Member Avatar for Frederick2
0
339
Member Avatar for coolcool

hi, am doing a project which needs speech recognition..my guide wants me to do it either c or c++ on my own..a basic recognition is even if english alphabets are recognised is enough..but i dunno how to start and where to start..first of all is t feasible..pls anyone help me..if …

Member Avatar for temp1234567
0
48
Member Avatar for Iam3R

Hi , I want to write a program on Lexical Analyzer: which finds the no of keywords, no of operators ( based on the classification arithmetic, logical,....), constants, and others. please suggest me one good method. i am using a method which follows as below: char *Arith_Oper[]={ "+", "-", "*", …

Member Avatar for Iam3R
0
136
Member Avatar for anthonytan

[url]http://www.daniweb.com/code/snippet216679.html[/url] This code is read an integer from user. is there any way, tt i can using char datatype variable to accept text only. text maximum is 30letter include string/spare. It also will do a check on the char array whether is text only. i've google around but no answer. …

Member Avatar for WaltP
0
77
Member Avatar for MAV_DevWantaB

Cant seem to figure this one out,,,, although I have been trying for several hours and cant seem to find any good examples on the [url]WWW..[/url]. I am attempting to write a program that prints the command-line arguments of a program... I did find a example that gives the Name …

Member Avatar for WaltP
0
148
Member Avatar for Iam3R

how the sizeof array is the total number of elements multiped by its base data type size, when the name of the array gives only the base address. [ICODE] int array [5]; sizeof array ; [/ICODE] gives 20 bytes. why not 4 bytes. because [ICODE] array = &array[0] .[/ICODE]

Member Avatar for Narue
0
124
Member Avatar for vinodxx

Hello friends, I have a code snippet related to pointer increment and decrement. [CODE]int arr[] = {1,2,3,4,5}; int *ptr; ptr = arr + 2; printf("%d %d %d %d %d %d\n",ptr,(ptr+1),ptr--,ptr,ptr++,++ptr);[/CODE] It is giving console output as: [B]1245020 1245024 1245024 1245020 1245020 1245020[/B] I am a bit surprised with the third …

Member Avatar for vinodxx
0
141
Member Avatar for Dave Sinkula

This is a [inlinecode]strtol[/inlinecode] version of [url=http://www.daniweb.com/code/snippet353.html] Read an Integer from the User, Part 2[/url].

Member Avatar for anthonytan
0
574
Member Avatar for adityap15

Hi, How can i use code of C with graphics of visual studio. The graphic should be of visual studio and i can write codes in C. How to do? Kindly help me.

Member Avatar for Ancient Dragon
0
84
Member Avatar for TheWhite

Theres a functionality that I need that is not built into the PHP source code. I would like to modify a .c file in the code, recompile, and then be able to execute the php function with the same name as the one I added to the .c in my …

Member Avatar for ShawnCplus
0
87
Member Avatar for Pamilerin

Please I have a little problem with my project. It goes "A polynomial of degree n is represented as Pn(x)=A0 + a1x + a2x2 + … + anxn Where a0, a1, a2, a3 , … , an are constant coefficients. Evaluation of suc polynomials may be important if Pn(x) is …

Member Avatar for nezachem
0
114
Member Avatar for mahela007

Would it be of interest to learn C or C++ if one already know python? I'm a linux and programming enthusiast (i.e hobbyist ;-) ) and C is pretty common on linux and many other applications. But is it worthwhile learning C if I already know python? What are the …

Member Avatar for Narue
0
179
Member Avatar for spitfire

I am getting errors when trying to compile my program, can anyone help? Errors are error C2143: syntax error : missing ')' before 'constant' error C2143: syntax error : missing ';' before 'constant' fatal error C1004: unexpected end of file found Here is my code: [code] // declaration of a …

Member Avatar for wish_C
0
636
Member Avatar for cthoes

i tried to pass one number by one within given range from for loop to while loop to check for armstrong. but the value passed from for loop into while loop is not accepting. so any suggestion [CODE] /*program to find armstrong within a given range */ #include<stdio.h> #include<math.h> int …

Member Avatar for n.s.hemalatha
0
135
Member Avatar for rigidboss

Hi, I wanna generate a software, which should read a C file and check for some rules. I mean, some lines will be syntactically correct according to C compiler. But logically sm lines will be wrong. I wanna detect such lines using this software. Please help me how to start …

Member Avatar for rigidboss
0
162
Member Avatar for TheWhite

I'm still fairly new to C, so I was wondering what would be the fastest way to get a char pointer pointing and ending between 2 different char delimiters? For example: text text (text I need) I need a char * to "text I need"

Member Avatar for William Hemsworth
0
117
Member Avatar for yushuan718

Hello, This is my first post here. I had learned c/c++ for about half a year, and hope now to move into win32 non-console programming. I use VC 6.0 as my IDE and had successfully created a simple "Hello World" project (built by VC 6.0) However, I do not know …

Member Avatar for yushuan718
0
106
Member Avatar for Graphix

Hi, I am currently learning C#, but when I made a program that allows the user to guess a word (in Dutch that's called "Galgje") it repeats the while-statement twice, ignoring the scanf(). I searched with Google and found out that the program is too fast for the user input. …

Member Avatar for Graphix
0
260
Member Avatar for uzair ahmad

Hello: I have an assignment of making game of life in language "C". My problem is: "The game of Life takes place on a 2d array of cells, each of which may contain an organism. Let occ(i) be the no. of cells adjacent to cell i that are occupied by …

Member Avatar for WaltP
-6
173
Member Avatar for johndoe444

Hi, What is the significance of the following format specifiers: [CODE]%10s %.10s %-10s %.15s %-15s %15.10s %-15.10s[/CODE] Thanks.

Member Avatar for WaltP
0
179
Member Avatar for asm2hex

Hello, So lately, I've been coming across this issue of mine and can't seem to find a solid way around this problem. My problem is due to the fact I'm using MYSQL C connector library. And, Attempting to gain all the Row's from my database and store them in a …

Member Avatar for Murtan
0
149
Member Avatar for Karthika_g

Can anyone help me in sorting the contents of a .txt file? Sample.txt 1562 Anu 42 1524 Ram 35 1578 Madhu 26 I want to sort into 1524 Ram 35 1562 Anu 42 1578 Madhu 26

Member Avatar for Murtan
0
99
Member Avatar for Karthika_g

Hi, I want to display a particular row of a text file and delete a particular row using C by having account no. as reference.. Can anyone help me in this. Sample.Txt: 1234567890 James 24 50000 1234567891 Allen 32 46500 1234567892 Robert 41 13600 1234567893 Smith 29 49000 Thanks in …

Member Avatar for Karthika_g
0
150
Member Avatar for michelle1

Hello there, Is there a library in C which provides a way to defines planes, lines and points as well as vectors. And is also then able to find the intersections of these? I'm not familiar with C at all and am not too sure where to begin searching for …

Member Avatar for michelle1
0
111
Member Avatar for bharath12345
Member Avatar for ROTC89

ok so i am trying to put a menu function on the server side of a server client talk program. i would like to know if i am doing this correctly. i am also receiving a error that displays this... [code=c] serve.c: In function âstr_echoâ: serve.c:48: error: âairlineâ undeclared (first …

Member Avatar for ROTC89
0
387
Member Avatar for vivek_295

I want to create a DBMS application using c. For this purpose i need to know how to store data in different databases i.e. SQL, Oracle or MS Access. It is ok if the data can be stored in the form of files but then the security of that files …

Member Avatar for Ancient Dragon
0
154
Member Avatar for stockton

I need to produce a program that would process/read a magnetic stripe card within a windows kiosk environment and would prefer doing this in C or C++. Could someone suggest pointers/recommendations about where one should start?

Member Avatar for Talguy
0
170
Member Avatar for johndoe444

Hi, I want to do this. Suppose I have a source file abc.c: [B][U]abc.c[/U][/B] [CODE]int a[/CODE] another source file test-lib.c which leverage a from abc.c [B][U]test-lib.c[/U][/B][CODE] #include "abc.c" extern int a; int main() { return 0; }[/CODE] Now suppose abc.c is only available as abc.o (source code not available). And …

Member Avatar for nezachem
0
115
Member Avatar for malaks123

help me to create a program determine if the input word is anagram or not anagram of if the words are the same they are identical.......here's my code can you fix it...................plss... [CODE] # include <stdio.h> # include <conio.h> # include <string.h> int main(){ int menu,i,j,ctr=0; char fw[20],sw[20],let; do {clrscr(); …

Member Avatar for TotoTitus
0
141
Member Avatar for niroop

can anybody explain me in detail about the associativity of operators plz....

Member Avatar for TotoTitus
0
98
Member Avatar for matthewl

hello I am trying to create an robot and I have been having a problem parsing the full string from the conf. As example the IRCServer, botnick, botname parameter does not contain the all the data. as the output shows: [code=output] ##################### # Ablaze Bot # ##################### Loading conf file: …

Member Avatar for matthewl
0
156
Member Avatar for dennis.d.elston

HI everyone, I am new the world of C and am having some problems with a class assignment. Can anyone help? [CODE] #include <stdio.h> #include <math.h> #include <string.h> #define Max_sites 10 /* maximum number of sites allowed */ typedef struct { int site_id_num[4]; /* id number of the site */ …

Member Avatar for dennis.d.elston
0
122
Member Avatar for soley

So, after way too long, I'm finally starting college this coming January. I plan on going full time, but I still have one more class to fill up the gap. My question to this wonderful community is this: I'm already taking an intro to C class, but there's also an …

Member Avatar for Wards
0
137
Member Avatar for Iwillpassc

Hi guys, I have a real quick problem, or at least I hope it's really quick. The thing is, I'm studying for a computing C final, and one of the sample questions requires me to take data from a file, put it in a linked list, and then place it …

Member Avatar for kamiyo
0
214
Member Avatar for Champhero

plz help me out to make a program in C. I want someone to tell me that how to make a program of parking slot in which car r entering and leaving...........??????

Member Avatar for WaltP
-4
77
Member Avatar for anthonytan

[CODE]#include <stdio.h> #include <ctype.h> int mygetd(double *result){ char c, buff [ 32 ]; return fgets(buff, sizeof buff, stdin) && !isspace(*buff) && sscanf(buff, "%lf%c", result, &c) == 2 && (c == '\n' || c == '\0');} int main(void){ double value; do { fputs("Enter a floating-point number: ", stdout); fflush(stdout); } while …

Member Avatar for WaltP
0
82
Member Avatar for MAV_DevWantaB

Salutations All,,, Just looking for some input on this C program..:?: I believe it is working correctly but I think I have my Understanding of bits backWards....... :hair: AnyWho - The program should input a value from user and call the reversebit function to print the bits in both original …

Member Avatar for MAV_DevWantaB
0
243
Member Avatar for spookytr

a. Implement an iterative function that takes an array of integers and the size of the array, and returns the sum of the contents of the array. b. Modify your function as to be defined in a recursive manner. c. In order to test your functions, implement a program with …

Member Avatar for spookytr
0
134
Member Avatar for malaks123

plss help me ......make a c program that will input two words and determine if they are anagram or not anagram if the same words they are identical.............this is my code but its not complete plss help me......... [CODE] # include <stdio.h> # include <conio.h> # include <string.h> int main(){ …

Member Avatar for Ancient Dragon
0
125
Member Avatar for BobFX

Hi, I am learning C#, having a good C background as a programmer. I need to port a C application to C#, but there is a very basic problems that stalls me. My C program has many subroutines, each of them in its own file. They share a common .h …

Member Avatar for BobFX
0
704

The End.