15,551 Topics

Member Avatar for
Member Avatar for atman

hello., ny1 knows what is the data type for displaying hex numbers? i know that specifier is %x, but dont know what data type it is ex: 0xBCD thanx!

Member Avatar for devnar
0
85
Member Avatar for BigFormat

Hello, I need to create some dirs (one for each user), taking the dir name from a given string. I managed to do this with the following code: [CODE=C] DIR *dir_ptr; char *target_dir; target_dir = malloc(32*sizeof(char)); for(all users) { /* Set username for current user */ target_dir[0] = '\0'; strcat(target_dir, …

Member Avatar for Salem
0
102
Member Avatar for slimjimmer

Hey, I'm really stuck on a program I have to make for a class. We have to integrate f(x) = cos^2 (x). We are given a file with values of x and corresponding values of f(x). We have to use a while loop to do the following sum: sum to …

Member Avatar for slimjimmer
0
125
Member Avatar for T'Scoopz

1) How can I use fscanf to read only the first character of each word in a text file? 2) How can I use fscanf to read only alphabets in a text file? - I tried %[a-zA-Z], but that doesn't work for some reason.

Member Avatar for Salem
0
71
Member Avatar for sambafriends

Hi, the concept of the program is enter a piece of text from the keyboard and place that piece of text into a file [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> void main() { FILE *fp; char s[80]; fp=fopen("new.txt","w"); if(fp==NULL) { printf("unable to open file"); exit(1); } printf("enter new line of text:\n"); …

Member Avatar for devnar
0
132
Member Avatar for Krysis

Hello again... So, I'm trying to read a file line-by-line and compare the first 5 characters of that line (that was read in) to another character string. If they don't match then it moves on to the next line of the file and tries to compare again. The problem I'm …

Member Avatar for Krysis
0
5K
Member Avatar for sambafriends

strunct num { int count; }; void main() { num n1; num *p; p=&num; scanf("%d", p->count); printf("%d", p->count); } when I attempting to do this one I got the error message like 0 Null pointer .....

Member Avatar for sambafriends
0
274
Member Avatar for Krysis

[COLOR="Red"]ATTENTION[/COLOR]: SKIP WHAT'S WRITTEN IN [COLOR="Red"]RED[/COLOR] UNLESS YOU WANT TO KNOW [B][I][U][COLOR="Red"]EXACTLY[/COLOR][/U][/I][/B] WHAT'S GOING ON... NOT NEEDED THOUGH! Well, let me first ask the general question/problem that's plaguing me in this "Coded Adventure"... [COLOR="blue"] "Let's say I've opened a file for reading and the file that I'm reading contains: Hello …

Member Avatar for Krysis
0
136
Member Avatar for nidhi89

i m new 2 programming so could anyone help me or give me a idea 2 how develop examination management system in C wat features should i aad 2 it before making a program of that

Member Avatar for Salem
0
47
Member Avatar for CoolAtt
Member Avatar for c_skyscraper

Hello Everyone, I have a terrible problem with data structures in C. i have defined a structure as below: struct MNT { char label[32],opcode[32],operand1[32],operand2[32]; struct MNT *next; }; typedef strct MNT *MNTABPTR; MNTABPTR mnt_first = NULL; and for allocating memory i used the following sentence: MNTABPTR newnode; newnode = (MNTABPTR)malloc(sizeof(MNTABPTR)); …

Member Avatar for c_skyscraper
0
115
Member Avatar for cutedipti

H! I have to write a program for sorting two dimensional array(e.g. Matrix) without converting it into a single dimensional array or using pointer concept. So, can u please give me any idea for writing this program?

Member Avatar for ArkM
0
100
Member Avatar for Nemoticchigga

Is keil software for programming microcontrollers a free tool, or does it need to be purchased with a license? Thanks.

Member Avatar for Colin Mac
0
100
Member Avatar for Whilliam

hello guys, Im trying to understand how fread and fwrite works. My teacher said that these functions can store/output binaries and texts in files. I know how to do it with string. Im confused with floats and integers. I tried to make a program for it but Im getting errors. …

Member Avatar for Whilliam
0
246
Member Avatar for monkey_king

I've made a program using gcc as a compiler. In my loops I've been using a uint type as the type of my loop variable. But now it seems that some systems doesn't support this type. Can I make a preprocessor conditional that does a #define uint to unsigned int …

Member Avatar for WaltP
0
156
Member Avatar for nidhi89

please help me in making project of 15-20 pages in C programming on Examination Management system

Member Avatar for ddanbe
0
206
Member Avatar for trashed
Member Avatar for mohit12

i am complete novice at image processing please i have a problem plz can any one of u can provide me with a simple c or c++ code for the problem ...............with comments i have a floor plan of a building here is the link [url]http://www.plantechdesign.com/planimages/PBM040.jpg[/url] our software can divide …

Member Avatar for Paul.Esson
0
153
Member Avatar for valchid

hi,can someone please tell me how i can read in data,save data to a file and print it out to the screen using the "gets" statement.My code starts something like: [code=c] #include <stdio.h>; #include <stdlib.h>; struct { char make[10]; char model[10]; double cost; int yearMade; }cars; int main () { …

Member Avatar for valchid
0
99
Member Avatar for psyman_86

Hello everyone, I am having problem with a multiple public definition: ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: currenpacketbeingsampled MODULE: DataSampling.obj (DATASAMPLING) DEFINED: Main.obj (MAIN) The variable in question is defined only once in the header file, and only used in the associated C file. From my understanding a macro guard …

Member Avatar for psyman_86
0
247
Member Avatar for Tank50

Hi Guys Most of time iam interest do a programming using C# language,but I got a project for PDA,so I hope to developed it using C language,Iam new to C language and ,what steps i have to do learn C language.Starting from first i think its time wasting,so what is …

Member Avatar for William Hemsworth
0
142
Member Avatar for dusse

Hello guys.. I´m trying to do something like the code below .. [code=c] struct node{ int a; char *s; }; void main() { node *x; int sMAX = 3; int nodeMAX = 10; x = (node*)malloc((sizeof(int)+sizeof(char)*sMAX)*nodeMAX); ... } [/code] in other words I want to alloc dynamically the number of …

Member Avatar for Narue
0
215
Member Avatar for salman213

Hi i have a question. Im using Dev C++ and this simple program takes in values of x and outputs *prints them on the screen. Although x should be an integer If i put in for example the letter "u" or any letter for that matter it goes on and …

Member Avatar for Narue
0
125
Member Avatar for lehe

Hi, I have an array. I put its definition in a .c file and externally delare it in a .h file like this: //.c file unsigned char jetmap[][]={ {0, 207, 255}, {0, 223, 255}, {0, 239, 255}, {0, 255, 255}, {16, 255, 239}, {32, 255, 223}, {48, 255, 207}, {64, …

Member Avatar for lehe
0
115
Member Avatar for bondo

Basically I'm reading from a file and populating a dynamically allocated array with the words that are in the file. I've already read through the file to figure out what numArts is, so I know how many words there are in the array. This works up until the: [CODE]arts[index] = …

Member Avatar for bondo
0
171
Member Avatar for lehe

Hi, I got this message "Windows has triggered a breakpoint in inout.exe. This may be due to a corruption of the heap, and indicates a bug in inout.exe or any of the DLLs it has loaded. The output window may have more diagnostic information" while debugging the following program in …

Member Avatar for lehe
0
206
Member Avatar for xlx16

when i wrote the following program in turbo c,the out put was right but when i wroted it in borland c,the out put was wrong and the (*) was printed in wrong place,so what is the problem with borland c for dos.for another example i wrote a program which contained …

Member Avatar for ajay.krish123
0
113
Member Avatar for nectionplayer

What are the likely questions to come in a C programming exam.(It's a cirtificate course) Please add your answers to the questions.

Member Avatar for ajay.krish123
0
64
Member Avatar for CoolAtt

hi ! does anyone know how to install & use the perl compatible regex (PCRE) api in Bloodshed Dev++ ?

0
90
Member Avatar for Terlington

Hi All, I'm actually making a little program but I'm encountering an error that I can't manage to resolve. So I have a linked list of "User" (each User has got a pointer to the previous User and another pointer to the next User). At First, the List is empty …

Member Avatar for Terlington
0
125

The End.