- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 38
- Posts with Upvotes
- 32
- Upvoting Members
- 26
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 4
- Interests
- Everything
- PC Specs
- Obsolete
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 … |
|
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. |
|
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 … |
|
|
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) … |
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 … |
|
|
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 … |
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 ? |
|
How do I show this output using for loop statement? 1 23 345 4567 Thanks in advance :) |
|
|
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 … |
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 … |
|
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 … |
|
|
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 … |
|
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 … |
|
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 … |
** # 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 … |
|
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 … |
|
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. |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 |
|
[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 * … |
|
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:"); … |
|
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 … |
|
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]. |
|
hi guys, sorry to disturb but I'm looking for the instructor's manual to 'C by a modern approach' written by KN king. |
|
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. |
|
how to find the position of a particular character in a given string in c |