Posts
 
Reputation
Joined
Last Seen
Ranked #295
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
88% Quality Score
Upvotes Received
38
Posts with Upvotes
32
Upvoting Members
26
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
4
17 Commented Posts
1 Endorsement
Ranked #888
Ranked #607
~101.17K People Reached
Interests
Everything
PC Specs
Obsolete
Favorite Tags
c x 269
c++ x 10
null x 8
list x 5
Member Avatar for Charlton21

In the following code, I need to optimize it for the fastest performance. I'm not asking anyone to do it for me, I'm asking if someone can look through the code, and let me know where I can get the best speed up by example loop unrolling a for loop …

Member Avatar for lernik
0
725
Member Avatar for pvbhargav

Hi all, I have already used InitGraph and have given the path(C:\\TC\BGI) in Initgraph and checked the Graphics option in Linker Options. Still Iam getting this error. I want a solution. Can somebody pls help me. Its urgent.

Member Avatar for Sun_5
-1
14K
Member Avatar for yhh

Hi, I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my …

Member Avatar for Sean1234$
0
14K
Member Avatar for Rahul47

Well, this morning I tried to write a program to update environment variable's list. And I got stuck at a very crucial point. I think am making some silly mistake. A second opinion will be helpful. Algorithm: 1) Take complete path of environment variable into a string variable 'env'. 2) …

Member Avatar for N1GHTS
0
214
Member Avatar for N1GHTS

Say I have code like this... typedef struct { unsigned A:1; unsigned B:1; } FlagStruct; extern FlagStruct *Flags; Imagine that the Flags instance is a shared resource in a multi-threaded application. Say thread #1 decides to read the value of Flags->A but thread #2 decides to set or clear Flag->B …

Member Avatar for N1GHTS
0
238
Member Avatar for zegarnek

Hi, I am just playing with C code in the console under Linux. In the old times a fair bit of code was written for a console; programs were operating in text mode, creating menues was quite a fun. I coded very simple c routine to print a strings of …

Member Avatar for N1GHTS
1
3K
Member Avatar for pittdaniweb

Hello everybody, I was asked by an interviewer the following question. but I was not able to answer. Please get back to me if you know the answer. thank you in advance. Que: What is the exact difference between the "for" loop and "while" loop in C language ?

Member Avatar for rajii93
0
794
Member Avatar for boomboombugsh

How do I show this output using for loop statement? 1 23 345 4567 Thanks in advance :)

Member Avatar for iqra liaquat
0
223
Member Avatar for Rahul47

Hi guys, here is my code that am working on this morning, and I came across a point when pointer operation went wrong. #include<stdio.h> int main(){ char a[20]="Hello World !!!"; char *ptr=a; FILE *p; p=fopen("new.txt", "w"); int i; for (i=0; *ptr != '\0'; i++){ fprintf(p,"%c", ptr[i]); } fclose(p); getch(); return …

Member Avatar for Rahul47
0
174
Member Avatar for symon_1

I have text file in D drive named "data.txt". It have several columns and rows like A B A B V B B V A B A A B B A A B A I want to read it and then convert it to say A=1, B=2, V=3 and then …

Member Avatar for Rahul47
0
236
Member Avatar for vibhu mishra

i m trying to run a mp3 file on dosbox plateform by c .i put the following code in to the batch file start c:\xyz.mp3 and trying to call this as system("c:/a.bat"), the system funtion is returing 0 but it is not running it. But the same code working well …

Member Avatar for cgeier
0
337
Member Avatar for Rahul47

I have two questions: 1) Here is a small program showing how one can use Array name as Pointer variable. #include<stdio.h> int main(){ int a[5]={1,2,3,4,5},i=0; for(i=0; i<5; i++){ printf("\nAddress: %d\tValue: %d", a+i,*(a+i)); } getch(); return 0; } If we can use array name as pointer variable, then why separately declare …

Member Avatar for Banfa
0
199
Member Avatar for Rahul47

Fairly easy pointer increment program is as follows. #include<stdio.h> int main(){ int i,a[10],*p=a; for (i=0; i<10; i++,p++){ printf("\nAddress of a[%d] is %d",i,p); } getch(); return 0; } Here is output: Address of a[0] is 2293488 Address of a[1] is 2293492 Address of a[2] is 2293496 Address of a[3] is 2293500 …

Member Avatar for Ancient Dragon
0
226
Member Avatar for H_beginner

I am using the gcc compiler and I am new to using flags. Can any one tell me a source for it. e.g. I wanted to use *-funroll-loops* but I dont know the proper syntax. Can any one help.

Member Avatar for L7Sqr
0
244
Member Avatar for Rahul47

The expected outcome dosent agree with result. Following is the code snippet. int a,c; a=10; c=0; c=(--a)+(--a); printf("C: %d", c); printf("\nValue of a: %d", a); I expected C to be 17 i.e (9+8), but it comes out to be 16. And a becomes 8 as expected. When expression is changed …

Member Avatar for N1GHTS
0
405
Member Avatar for shakin

** # import a data table with space? # ** Good day! I need to read in all the data in a file within column two and export it in a file. The issue is the data is not standard and has blank fields from time to time. It also …

Member Avatar for N1GHTS
0
255
Member Avatar for kristina.densmore

I just started programming in C our first asssignment is writing an alogrithm to compute the volume of water in cubic feet, flowing through a pipe of diameter d in feet, with a velocity of v feet per second, give this fomula r=d/2 area=pi x r squared volume = area …

Member Avatar for cgeier
0
462
Member Avatar for shaneetra.graham

I'm buidling my own shell and I was trying to implement a history function, but was a little lost on where to start. I know i would like to use a for loop to go through list, I'm just having trouble on where to store it.

Member Avatar for N1GHTS
0
125
Member Avatar for Van_1

Hi. I just got a problem running my graphics program written using C language in DOS Box. There may seem a problem using the graphics.h running through DOSBox in Windows 7 ultimate 64bit. The program just flickers fasts when I run it. I know that my program is correct and …

Member Avatar for N1GHTS
0
396
Member Avatar for kent.johnstone_1

Is this a "typedef" problem? This is the definition in one file. typedef BYTE SOCKET; //Socket descriptor BYTE is defined elsewhere as type char. (I made sure the file where SOCKET is assigned a type is included in the file the problem is in.) This is one place it is …

Member Avatar for kent.johnstone_1
0
314
Member Avatar for Renesme-LuCiFeR

Hi Every One, I Was Wondering If Anyone Could help me With This Problem Or Not... I Just Need A Simple Program, With The Least Amount Of Using Arrays, And Loops... And My Main Problem While Writing It Is When I Want To command The Program To Act Like a …

Member Avatar for Ramesh.YoTLC
0
234
Member Avatar for N1GHTS

I am importing some C code into a C++ compiler, specifically Borland C++ Builder 5. I seem to have a problem with this style of code: // A structure that contain's itself typedef struct AnObject AnObject; struct AnObject { AnObject *Object; }; // A global structure to store a pointer …

Member Avatar for N1GHTS
0
236
Member Avatar for peter20

Hi all, I have to check and give grades to some projects written in C. Do you know a free program which detects source code plagiarism ? I found CodeSuite but it asks me for key. Thanks in advance

Member Avatar for L7Sqr
0
293
Member Avatar for robinpurbia

[CODE]#include<conio.h> #include<string.h> //prototype declaration int pnc1(FILE *fp); int pnc2(FILE *fp); int findstr(char *p[], char *name); int sum_array(int a[][], int element); //function to pick data and then convert bits to number // for notes_disp , notes_req int pnc1(FILE *fp) { int tot=i=j=k=0; i=getw(fp); j=getw(fp); k=getw(fp); tot=(100 * i) + (10 * …

Member Avatar for zeroliken
-1
106
Member Avatar for BITnur

Im doing my project on number conversion. I found the coding below. can anyone help me to explain the coding. why the coding have "count"? why the "count + 1"? what function of "count"? [CODE]void Bin2Dec() { long int a[20],i,n,count=0,b[20],c[20],sum=0; printf("\n Enter a binary number to convert to decimal form:"); …

Member Avatar for BITnur
0
231
Member Avatar for engineer61

Hi friends I need urgent help. now three variables we printed to a file received from the user. This variable to another file, the user wants to take that file and the value of the variable is a variable, you need to do. And this event is the first change …

Member Avatar for zeroliken
0
134
Member Avatar for randolph.gamo

Write a program that converts upper case to lower or lower case to upper, depending on the name it is invoked with, as found in argv[0].

Member Avatar for zeroliken
0
44
Member Avatar for randolph.gamo

hi guys, sorry to disturb but I'm looking for the instructor's manual to 'C by a modern approach' written by KN king.

Member Avatar for N1GHTS
0
108
Member Avatar for coding101

How would I hide keystokes when I use the keyboard? When you use scanf fgets and gets, they show they print the keys to the screen.. I want to hide them.

Member Avatar for N1GHTS
0
95
Member Avatar for amit_as