15,550 Topics

Member Avatar for
Member Avatar for bflack
0
78
Member Avatar for westony

Hi, there i didn't even know is that how its called but can you help me and tell me what is that LLIST from the structure into the type function and why its used in this case: [code=c] typedef struct node { int data; struct node *next; /* pointer to …

Member Avatar for abhimanipal
0
156
Member Avatar for CodeAerial

Before I start, I would like to stay thanks to the people who helped before in my previous threads. Sorry if I can't reply quickly at that time due to connection issues. Back to the problem. I am working on a stemplot([url]http://en.wikipedia.org/wiki/Stem_and_leaf_plot[/url]), which prints the data(the plot thing) into the …

Member Avatar for CodeAerial
0
974
Member Avatar for JesterDev

I'm learning C mostly for linux development, but right now I am working through a few general books to get me started. But I am having some problems understanding #define versus declaring a variable directly(?). I know that #define declares a constant, but for example normally I would declare a …

Member Avatar for Ancient Dragon
0
4K
Member Avatar for jemz

Hello can you help me,i have problem of this if i will use scanf("%c",&repz); my porgram will exit it will not loop to menu..but if i will change to %s this will loop to menu...but i declare variable repz as char...can you help me or explain on this why it …

Member Avatar for jemz
0
115
Member Avatar for konohastar

Hey guys, i am working on a program and it deals with arrays. Basicaly its a conversation program i am working on. I have alot of it done but i am stuck with the displayiong of the info. Now being this is an assignment i would really like advices and …

Member Avatar for konohastar
0
116
Member Avatar for blackrobe

Hey there, I'm currently using NetBeans 6.8 running Cygwin GNU Bash version 3.2.49(23)-release. I'm having a problem running my program that uses pthreads, mutexes, and semaphores. After it creates 1 to 3-4 threads, it returns a Segmentation fault. I ran the program on a computer running Linux (using NetBeans as …

0
116
Member Avatar for DarkChewby

Hello, I am really new to writing C code. I am generally written Java code all my life, so I am struggling with C code as this is the second program I am writing in C. I am trying to read a txt file that has numbers in the format …

Member Avatar for N1GHTS
0
95
Member Avatar for wildberries

Hi guys, I'm trying to make a program where i read in two words and then search a text file for each occurence of that word. Also I want to print the first line that each word occurs in. My problem is after i get into the file I cannot …

Member Avatar for WaltP
0
137
Member Avatar for hisugan
Member Avatar for saad749

[B]Aim:[/B] Well, What I am trying to do is to store the names in an array and scores scored in another array. Then Write them into the file. When the program is ran again, I will like to read the stored names and scores, add the new name and score, …

Member Avatar for saad749
0
153
Member Avatar for N1GHTS

I have a weird problem and I want to know if any of you have any ideas on how to fix this. If I do this... [code] swprintf(Dest, 500, L"G%sY", "AMEDA"); [/code] [b](wchar_t*)Dest[/b] contains the following text... [TEX]GAMEDAY[/TEX] But if I do this... [code] swprintf(Dest, 500, L"G%sY", L"AMEDA"); [/code] [b](wchar_t*)Dest[/b] …

Member Avatar for sree_ec
0
180
Member Avatar for logicmonster

I'm working on a code that will multiply two matrices and print the result. This specific code is meant to ask the user to define the bounds of the matrices (i.e. the (M)x(N) of the matrix) then ask for each matrix by row. The trouble I'm having is that I …

Member Avatar for N1GHTS
0
137
Member Avatar for sundip

Hi all Can we convert a string to function name in c. I am not looking for function pointer. Like:- [CODE] void fun1(); voide fun2(); char *fun = "fun1"; (*fun)(); [/CODE]

Member Avatar for sundip
0
254
Member Avatar for abhi_elementx

Hello all. I want to find the return address where execution should jump after returning from a function. Say this is my code: [CODE] void foo(){ } int main(){ foo(); printf("After foo.."); return 0; } [/CODE] After foo() returns, how to find the rturn address where control will be passed? …

Member Avatar for abhimanipal
0
802
Member Avatar for ceatkin2

I am trying to demonstrate to my class mates the run time difference in using bit-wise and logical operators. I chose to do this by writing a simple (I thought) program that reads 2 ints from the console, and multiplies them two separate times, one using the logical multiply (a …

Member Avatar for N1GHTS
0
238
Member Avatar for advait_123

Below is the function I copied to get the answer...so plz do tell us the simple method for this..... [CODE]int ** addmatrix(int **a,int x1,int y1,int **b,int x2,int y2) { int i,j,**c; c=(int**)malloc(x1*sizeof(int*)); for(i=0;i<x1;i++) *(c+i)=(int*)malloc(y1*sizeof(int)); if(x1==x2 && y1==y2) for(i=0;i<x1;i++) for(j=0;j<y1;j++) *(*(c+i)+j)=*(*(a+i)+j)+*(*(b+i)+j); return(c); }[/CODE]

Member Avatar for N1GHTS
0
100
Member Avatar for Auraomega

Is there any documentation available on creating a dynamic voltage frequency scaling tool in C? I've been unable to find anything on Google and the only applications I seem to be able to find using DVFS are closed source. My preference would be for a Windows based system as that …

Member Avatar for N1GHTS
0
125
Member Avatar for eman 22

what's the meaning of - abstract data type - heab and stack - preprocessor.

Member Avatar for N1GHTS
-1
101
Member Avatar for Kakashi Hatake

I wanted some information on the return values : 1. Is it always necessary for a return value of [B]main()[/B] to be an integer. 2. What happens if the return value of [B]main()[/B] is not integer. 3. When a return value other than 0 is returned - does it always …

Member Avatar for pro_rocky
0
120
Member Avatar for amala.123

hi guys. i was going through a code where i saw an enum written as: typedef enum { #define LWIP_MEMPOOL(name,num,size,desc) MEMP_##name, #include "lwip/memp_std.h" MEMP_MAX } memp_t; # define inside enum. wat does it mean. Also i saw: #if !MEM_USE_POOLS static #endif const u16_t memp_sizes[MEMP_MAX] = { #define LWIP_MEMPOOL(name,num,size,desc) MEMP_ALIGN_SIZE(size), #include …

Member Avatar for amala.123
1
655
Member Avatar for hanvyj

Hi, I have a list of named enums: [CODE=C]typedef enum EGCDevicePneumaticState { EUnknown, ENotPresent, ENotReady, EPressureNotReady, EFlowNotReady, EReadyOn, EReadyOFF, NumberOfEGCDevicePneumaticState, }; typedef enum EGCDeviceReadiness { EUnknown, EReady, EReadForPrep, ENotReady, NumberOfEGCDeviceReadiness, }; typedef enum EGCDeviceRunState { EIdle, EPreRun, ERun, EPostRun, NumberOfEGCDeviceRunState, }; typedef enum EGCDeviceThermalState { EUnknown, ENotPresent, EOff, ENotReady, EReady, …

Member Avatar for hanvyj
0
6K
Member Avatar for unnamed17

Hi there, I am trying to make a piece of code in C that: 1. opens a specified file, 2. Reads the data in the file and include it in MySQL, based on the position of commas, 3. Converts the last two number into binary and then performs some check …

Member Avatar for unnamed17
0
117
Member Avatar for prasanthsagar

I have an array with some integers. i want to remove redudants integers in the array and print the integers without redudancy... can any one give me the code please.....

Member Avatar for N1GHTS
0
313
Member Avatar for mainstreetmark

I'm doing my first C project in, maybe, 15 years, and have gotten stuck. I'm trying to link a 3rd party library into my project. I've installed the headers in ./include/ft and the libs in ./lib/ft Here's my compiler command and associated output: [icode] [root@wayne tele]# g++ -g lib/ft/libmbusmaster.a -lm …

Member Avatar for mainstreetmark
0
303
Member Avatar for challarao

Hi! I have written a function for passing a string into it and finding its length. When I pass a string it prints a correct value. But when I take two strings and passing them individual len(str1),len(str2) after scanning two strings it returns the wrong value. In the first case …

Member Avatar for Banfa
0
106
Member Avatar for puttam77e

Dear Friends, Can any one suggest me, im using Windows 7, i m try to install the Turbo C complier, but it is creating virtual directory, after completion of the creation of directory, it will ask for renameing the root path, How can i rename the root path... (virtual Directory …

Member Avatar for najmul islam
1
371
Member Avatar for asyk

Hi there, I am trying to find the max and min value in a an array of size 100, but the input is stopped when there is a 0 entered, and it too gets added to the array. The code below works good, EXCEPT it's min value is always -2, …

Member Avatar for asyk
0
137
Member Avatar for ceatkin2

I am trying to define a 2D array of 1000 by 1000 ints and then test which transversal method is faster (row major or column major). I have this written [CODE] #include <stdio.h> #include <time.h> int main() { clock_t start, end; double elapsed; start=clock(); int array[1000][1000]; int row, col; for(row=0; …

Member Avatar for ceatkin2
0
166
Member Avatar for gju

hi guys, i am not able to declare the array dynamically in c will you help me out thanks

Member Avatar for abhimanipal
0
122

The End.