15,550 Topics

Member Avatar for
Member Avatar for 9868

Here is a code: [CODE] #include<stdio.h> #include<string.h> int main(void) { char *s1="hello"; char *s2="world"; char *s3; s3=strcat(s1,s2); printf("%s",s3); } [/CODE] What does strcat returns? Why does this code results in run time error? And one more question : Are "hello" and "world" terminated with '\0' in case of char pointers? …

Member Avatar for Ancient Dragon
0
73
Member Avatar for Para2x

[B]Hello to All i want to read txt file that contant some data's such as :[/B] [CODE]1,2,3,4,5,6 7,8,9,10,11,12 13,14,15,16,17,18,19[/CODE] [B]and then write them into a two dimentional Array .[/B] for example : first line of file must be first row of array or another example the first data in first …

Member Avatar for Aia
0
121
Member Avatar for Dream2code

While we allocate memory using malloc/calloc.That much bytes is reserved by the program.When the program terminates and we didnot free it what happens exactly? How to check memory usage by a program by writeing a C program.

Member Avatar for Dream2code
0
121
Member Avatar for Kurt Kubing

How can I obtain font properties thru a font file (*.otf;*.ttf or PostScript fonts)?

Member Avatar for Dream2code
0
121
Member Avatar for mrestrepo30

Hi! I'm just starting to code in C, and I'm trying to read the information in a dat file, to then use it in some calculations. I read the information in the file and then save it in an array. However when I try later to access that array I …

Member Avatar for Dream2code
0
141
Member Avatar for olarotimi73
Member Avatar for ithelp
0
266
Member Avatar for anne_1000

Dear all, I have a weird problem reading a file using fgets. The code below should read the first line of the file "F:\\filename.csv". It works for all sorts of files that I create myself, but it does NOT work for certain files that I download from the internet. More …

Member Avatar for Dream2code
0
292
Member Avatar for bryangarcia

what does this mean: read value of the integer variable [I]first_int[I][/I][/I] from the user's input? i dont know what's the proper c statement for this... i'm trying my code but there's always an error...

Member Avatar for csurfer
0
137
Member Avatar for bryangarcia

Good day to all, i'm just starting to learn c language...and i have a something to know ... is the opening curly bracket and closing curly bracket mean that it will end and begin a segment in c? thank you...

Member Avatar for csurfer
0
145
Member Avatar for manutm

Hi everybody! I,ve made a 'news ticker' app for linux in c and gtk+. Now 'm porting it to win xp using mingw. The problem is the win xp version is slower. Basically, the image is refreshed every interval ms. I've set a timeout using g_timeout_add_full(interval, handler, ...) in the …

0
40
Member Avatar for bubblellicious

Hi there. That's my first thread here. Maybe my english level is not good as yours coz i'm from Spain xD First of all, I have a constant string which has a thousand of chars, with no empty positions, only characters. And I have to find repetitions of 6-letter and …

Member Avatar for bubblellicious
0
118
Member Avatar for shtikk

can you help me make a typing game of falling letters(randomly), and as the player presses the key of the letter, the letter being pressed will vanish and points will be gained by the player. Thank You.

Member Avatar for Salem
0
116
Member Avatar for Dream2code

Hi All, My requirement is like this.It a part of a software devlopment team as i am devloping a tool its a part of it. Its bit long but my explanation is clear to get it. 1)we need to read a data file using a description file. Usage: programname <description_file> …

Member Avatar for Dave Sinkula
0
439
Member Avatar for calicocat

I am trying to improve a program I have, but there is one thing I cannot figure out to do... so, trying to make this short, this is what I'd like to accomplish: Is there a way for C to count how many variables are equal to a particular value? …

Member Avatar for Dream2code
0
94
Member Avatar for ishaanarora

Hi guys I m trying my hand on some program::where there is a function like this::[CODE] void IVR_AL_GET_VM_RETRIEVAL_PROFILE_REQ(ds *pline, char xmlToken[e_LASTCOUNT][5000]) { strcpy(xmlToken[e_MESSAGETYPE],"GET_VM_RETRIEVAL_PROFILE_REQ"); strcpy(xmlToken[e_MSISDN],pline->user_info.msisdn); strcpy(xmlToken[e_TRANSACTION_ID],pline->transactionId); return; } [/CODE] where ds and user_info are structures:: [CODE] struct user_info { int msisdn; char redirReason[17]; //Used in GET_VM_DEPOSIT_PROFILE_REQ char *caller_no; //To be used …

Member Avatar for ishaanarora
0
136
Member Avatar for aayush2687

how can i change a recycle bin folder to any other folder or utility of windows (e.g. recycle-bin ------>window media file or window media file ----->temp folder) (conver to sign --->) [B][COLOR="Green"]using 'c' language.[/COLOR][/B] so dat i m able to make a little folder converter software dat help a user …

Member Avatar for mvmalderen
-1
158
Member Avatar for sumeetdesaeee

I recently appeared for the entrance of cdac. There I found a lot of questions about postfix.(I know the postfix operator commonly used in c.But it wasn't that way.) Sample question:- Wat will the expression ABC AB AC will become after postfix operation?? Please tell me how to deal with …

Member Avatar for Dream2code
0
202
Member Avatar for rcbhat

Hi, this is the code that I have to swap two strings- [code=C] void swap(char *,char *); main() { char *x="new"; char *y="word"; char *t; swap(x,y); printf("(%s,%s)",x,y); } void swap(char *x,char *y) { char *t; t=x; x=y; y=x; } [/code] output- (new,word) Why is the swap function not swapping the …

Member Avatar for tuse
0
278
Member Avatar for SergioQ

So I work in C with the Win SDK, or Platform SDK now adays. I don't want the specific answers but need to create TWO printing solutions. 1 - Which printers on speciality printers (i.e. a Brother Label printer) 2 - Prints out on a normal printer, but with graphics …

Member Avatar for Ancient Dragon
0
61
Member Avatar for tangent03

[code=c] #include<stdio.h> #include<conio.h> int fun(int,int); typedef int(*pf)(int,int); int proc(pf,int,int); void main() { printf("%d",proc(fun,6,6)); return 0; } int fun(int a,int b) { return(a==b); } int proc(pf p,int a,int b) { return((*p)(a,b)); } [/code] ans= 1

Member Avatar for Tom Gunn
0
143
Member Avatar for makavelixx

I am trying to figure out what I'm doing wrong with this code to keep getting errors, its a simple trip planner for a class I am taking however it will not compile and is giving me these errors: C:\Documents and Settings\Justin\Desktop\trip.c In function `main': 24 C:\Documents and Settings\Justin\Desktop\trip.c syntax …

Member Avatar for Pavan_
0
276
Member Avatar for rachelwiliam

[code] #include<stdio.h> #include<conio.h> #include<math.h> #include<stdlib.h> typedef struct { int M[40][40]; int br; int kl; }mtrks; void entri (mtrks *A, mtrks *B); //void entrinilai(mtrks *A, mtrks *B); void entrinilai(mtrks *A,mtrks *B); void tampil(mtrks A, mtrks B); //void tampil(Matriks M); void pilih(mtrks *A, mtrks *B, mtrks *C); int add(mtrks A, mtrks B, …

Member Avatar for mvmalderen
0
140
Member Avatar for mshafi

I tried to compile a code written in C which had included the file "graphics.h".It worked fine in my desktop PC which had a VGA monitor.But when i tried to run the same code in my laptop,it showed some graphics error. why is it like this?fG

Member Avatar for dng
0
444
Member Avatar for xyzt

Hi I use ctags and vi integrated. It's fine for now but I wonder if it's possible to find usages of a function? May be someone helps. Thanks in advance.

Member Avatar for jqbsx
1
67
Member Avatar for dcm882003

I'm stuck on my MAXROW is suppose to be 40 but everytime I input it I get a weird output. I'm pretty sure my counter is correct. Can someone please take a lookk and direct somehow. [code] #include <stdio.h> #include <stdlib.h> #define MAXROW 15 #define MAXCOL 6 #define ValuesPerLine 10 …

Member Avatar for wildgoose
0
123
Member Avatar for Hiroshe

Is it possible in C to pass a 2d array without eather of the sizes known? Something like this maybe: [CODE=C]#include <stdio.h> void somefunction(int *array); int main(void) { int array[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; somefunction(array); return 0; } void somefunction(int *array) { printf("%d\n", array[3][2]); …

Member Avatar for Hiroshe
0
10K
Member Avatar for xyzt

hello, i was looking at a program someone wrote. I saw something like that: name = (char*) strdup(path); strdup already returns char *, so why do we need casting here? did he do a wrong thing or am i wrong?

Member Avatar for xyzt
0
86
Member Avatar for linkingeek

Here i am posting again the program for creating the table of contents which are filled according to the user with dynamic arrays but yet the problem regarding the output is not solved ,i know dry run is correct , compilation is free from errors and warnings,builtable() function is working …

Member Avatar for linkingeek
0
115
Member Avatar for nonadoes

Hi guys, i'm new here and new to c/c++ programming. could you guys guide me how to extract some character/number from a char string? Example: char = TAGNAME_C123_V45_S67_M89 i want to extract the numerical number next to the character. The TAGNAME and the number is varies. So my code should …

Member Avatar for nonadoes
0
217
Member Avatar for melissa.johns

I am attempting to see have much run time a program takes, and eventually check the runtime of different pieces of the program. (As it runs it seems to get slower and slower without explanation) Anyways, I tried the sample code posted on a super simple program. If I wanted …

Member Avatar for jephthah
0
98

The End.