15,551 Topics
![]() | |
Can anyone tell me what the purpose of C functions which start with "__" ? Also another question is the same use of the "__" in defines like #define __HTTP_VERB_GET "GET" | |
Hi People I'm a newbie in c, I learn in c++, but I don`t really know to much. A friend make a code in c, working in a linux pc. And works perfect. I normally work in Micorsoft Visual Studio, but this c code, seems not to work well (88 … | |
this code removes comments please help in correcting the code //Program to print a file by removing Comments #include<stdio.h> void main() { FILE *fp; char ch; //clrscr(); fp=fopen("temp.txt","r"); while(1) { ch=fgetc(fp); if(ch==EOF) break; else { if(ch=='/'){ ch=fgetc(fp); if(ch=='/') { while(1) { ch=fgetc(fp); if(ch=='\n') goto label; } } if(ch=='*') { while(1) … | |
Does knows any library that produces the inverse of a given matrix ? Or is there any C example available ? | |
I've been writing my own implementation of stdio.h whenever I get a few spare minutes recently. Nothing fancy or thorough, and without wide character support, it's hardly conforming. But I was looking at one of my intermediate versions of printf and could only marvel at how ugly it was. So … | |
I'm having problem with storing values in multi dimensional arrays. I need to have 10 * 10 array with rows and columns. I have intitialized the array with blank spaces " ". But after this I need to store letters like 'A' 'C' 'S' on specific locations in that array. … | |
I'm having some trouble understanding the advantages and disadvantages of using scanf over fgets. When we have allocated memory using an array for eg, it is not wise to use scanf since buffer overflow can occur. But in what way does fgets prevent that from happening? Also, if you are … | |
Hello Im new to C programming, im trying to learn how to create a textfile with whatever name the user of the program wants. something like this, please ignore that this code wont work, its just so you might understand how i am thinking: [code] FILE *file; printf("name of the … | |
pls help me on solving my project. this program isrunning but when i press enter it will be sent back to the compiler. pls help me thanks in advance [code=c] #include<stdio.h> #include<conio.h> #include<string.h> string(); int x,i,a,b,y; int stocks[5]={4,5,3,6,2}; int code[5]={100,101,102,103,104}; float cost[5]={5000.00,4000.00600.00,3500.00,7000.00}; char des[5]={'t',d',v',v',c'}; float PA ,dis,net_pay,downpayment,monthly; int main() { … | |
i try to compile this programm useing pluto,it shows me error .where schould the fehler be? [code=c] #include <"stdio.h"> int main() { int counter; int even=0; int b= 7,int h= 10; if h+ = b % 10; b /= 10; for( counter = 1; counter <= 10; counter++); { if … | |
Hey guys, I'm a long time lurker, and first time poster. Please be kind. Anyways, for one of my classes, Principles of Algorithm Design 1, we had an assignment where we had to create a program that would encrypt and then de-encrypt a message by offsetting the characters by a … | |
I can't find the answer to this in any C reference. The question is, is there any way to do this: [code=c] #define MAX 10; struct aStruct { int a; int b; }; typedef struct aStruct aType; aType array_of_atype[] = { {1, 2}, {3, 4}, {5, 6}, {7, 8}, {9, … | |
I need to make the program: [QUOTE]Write a program to ask for a string and a single character. Read in the string using getchar(). Read in the character using scanf(). Count and report the number of occurrences of the character in the string. Add a brief comment at the beginning … | |
Hi. I was wondering if any one could help me with this program. I didn't get any error messages. It was excecuted but the output was incorrect. I got Unordered data: 7 3 66 3 -5 22 -77 2 After pass 1: 7 3 66 3 -5 22 -77 2 … | |
You have a problem with your code. You need help. You are in a hurry. What can you do? Post for help at Daniweb as fast as you write, correct?. Wrong. The first thing you should do is to read the rules on posting and specially how to properly make … | |
Hello, Is there any way of reading words from a string containg a few words separated by white spaces using a loop? I don't know how many argumets the user will input. I wanted to do it like this: [code] for(i=0;i<wordCounter;i++) { sscanf(input,"%s",argument[i]); } [/code] But this keeps reading in … | |
I have to write an interactive program using scanf() to read in seven strings input by the user. The program should print the seven strings as a list, then sort them alphabetically and print a new list. I have to use the function strcmp() to assist in the sorting of … | |
how do i write a C programm to add two figures together e.g b and h if b = 0125 and h =2354 b = 0+1+2+5 = 8 h = 2+3+5+4 = 14 and the output to be ++++++++ * * * * * * * * ++++++++ * * … | |
I could really use some help here. I can't figure out what's the problem is, so I've assumed it's all C's fault. I have a function: [code]pf_plot32(Uint32 data[], Uint32 dl, pfplot pattern[], Uint8 pl, Uint32 pr, struct pf_path32 *path)[/code] ..Which takes a pointer to a structure: [code] struct pf_point32 { … | |
Hello everyone,i need help here(urgent!!): here is what my program for: 1.user will enter a string not more than 300 words. 2.change string to lowercase 3.count each word occurrence example: This is a test. This program will count number of each word occurrence. this = 2 is = 1 a … | |
this is suppose to be a binary search to return the number of times a number is found in the array.............but for some reason it isnt calculating the correct number of times the number is found....already had my paper and pen out trying to find the error but it aint … | |
This program is wrotten by me college's teacher, and i so confuse and do not understand why is like this coding. [code=c]#include<stdio.h> void main() { int i,j,class_size,mark; int freq[11]={0}; //why make freq[11] for 11 variables?// printf("This program produces a bar chart\n"); printf("showing marks distribution...\n"); printf("\nHow many students?"); scanf("%d", &class_size); //make … | |
Hello, I have to write a program using exec() where user can specify the pathname and arguments. I am trying to read in the arguments in the following way: [code] #include <stdio.h> #include <unistd.h> #include <sys/wait.h> int main() { ... int i; char *cmd[100]; char argument[100]; i = 0; for(i=0;i<3;i++) … | |
can someone tell me if the code is right. cuz my T.C doesnt work. [code=c] #include<stdio.h> #include<conio.h> int num1,num2,num3; int num4,num5; int main() { clrscr(); printf("ENTER NUMBER"); scanf("%d",&num2); num1=1;num2=1;num3=1; printf("%i",num1); printf("\t%i",num2); for(num1=1;num1<=num2;num1++) { num3=num1+num2; printf(\t%i",num3); num1=num2; num2=num3; } getch(); return (0); } [/code] | |
| |
hi all, i would like to know the all possible command line options of GGCOV tool... ex:1. ggcov program name 2.ggcov -o dir if anyone of you know this,plz send me the details... Thanks in advance..... RajasekharReddy.B | |
So here's my problem. I need to copy paste two 2d arrays together to form a new one. So in this function I allocate memory for the new array and then I use the memcpy function to start copying. The first copy goes fine. But i am not sure how … | |
Hello there, do you have any idea where to get a good reference for the function fseek64? Or does anyone of you here knows this function or is there really a fseek64 function? lol. Thanks! | |
Hi, I need help to sort a file. I am able to open the file, but the lines of the text file are separate by commas and I have to separate the lines into 4 differents string of characters. I have problems separating the string and sorting them by name. … | |
a c program to convert lower case text to upper case using strlen (). a c prog to arrange names in alphabetical orderusing strcpy (). a c prog to check wether given number is prime or not. to find length of sring without using library function. to check wether etered … | |
[B] Hi All, I need very urgent help regarding reading tiff file and apply mean filter on it. I will be really thankfull to you if u can provide me C source code. Please help me..... Regards, Jaya Sharma[/B] | |
I need to write a C library routines to allow user to process images to get different effects like inverting colors and scrolling vertically and horizontally. for inverting colors, we need to write a function- for scrolling vertically and horizontally, we need to write a procedure- and call these function … | |
I'm still confused with file i/o here and needs a bit of help on fixing the codes I have. Can anyone offer some help? I have two codes here that sort of work together. One is a database type of code that is supposed to get input form the user … | |
everyone here can give me the code of this sample program.. enter a positive number: 100 your inpit is: one hundred.. i allowed to use the do...while loop.. if every one here who can send me the code of this sample output.. send it to [keep it on the site].. … | |
I want to do a binary tree code that outputs an actual tree, but I'm a little lost right now and don't know what to do. I did this code in Dev C++ Here's the code so far: [code]#include<stdio.h> #include<stdlib.h> #include<string.h> #include<strings.h> #define TRUE 1 #define FALSE 0 int size; … | |
can someone help me on editing my program. it is a one year calendar and im now stock. and i did;nt put default bec. it will not run. #include <stdio.h> #include <conio.h> int a,b,c; int main() { clrscr(); printf("Enter Number:"); scanf("%d",&c); switch(c) { case 1: printf("\t\t\tJanuary 2007"); printf("\n\t"); for(b=1;b<=51; b++) … ![]() | |
hi all, i have Theora video codec source code (a C library) and i want to debug it using GDB in linux. but if its developers have not provide debuging enable option, how can i manualy chnaged the make file for unabling debuging optins. please can anyone help me to … | |
I have several .CPP and .H fles which i want to compile together. These files are used for PLC and Oracle database communication. when i try to compile these files it says following header files are missing .. [COLOR=red]<occi.h>[/COLOR] [COLOR=red]<sys/msg.h>[/COLOR] [COLOR=red]<sys/time.h>[/COLOR] [COLOR=red]<sys/stat.h>[/COLOR] [COLOR=red]<signal.h>[/COLOR] How can I recover these files & … | |
can spmeone help me with any c compiler avaliable that i can easy download and the keys that i can use for the command. | |
Write a TSR program that changes the background color of the screen to red every 5 second and then white next 5 second, And this continues until you press ‘Q’ It should not modify the text displayed on the screen. Hint: 1_ Intercept Keyboard interrupt (0x09H) 2_ Use video text … | |
I have been checking on others letter count programs and none so far are like mine so I'm now making my own thread. My assignment, which is due tomorrow! *Yikes* Is for me to make a text file in notepad and then important that to my code. Then, I has … | |
Hey all, I am new to C/C++ and this week we just started object oriented C++. Before I dive into it I want to have a good understanding of simulating object oriented programming with C. Anyway, I believe I have doctored the code to where the queue and the Stack … | |
i would like some examples of simple c or c++ codes that can shut down a computer like say at exactly 9pm. could anyone give me a sample c code that can pop up on the screen warning that the computer will shut down in 20 minutes. | |
Hello, I have to write a few programs. I have an attachment of what i have so far. Can anyone direct me in the right direction. | |
hai..can anyone help me on this task...i might need some sample on doing it.TQ Tasks: 1 You are expected to write a program that simulates CPU scheduling algorithms (SJF and SRTF). 2 The program will request the user to set the the number of processes to be selected for execution. … | |
#include<stdio.h> #include<conio.h> #define n 20 main() { int d,p; int b,i,n,bt[20],at[20],num; int arr[20]; clrscr(); printf("ENTER THE NUMBER OF PROCESSES: "); scanf("%d",&n); for(i=0;i<n;i++) { gotoxy(10,5); printf("PROCESS: %d",i+1); gotoxy(25,5); printf("BURST TIME : "); scanf("%d",&bt[d]); gotoxy(50,5); printf("ARRIVAL TIME :"); scanf("%d",&at[p]); } gotoxy(29,20); printf("SELECT ALGORITHM"); gotoxy(29,25); printf("\n[1] - SJF"); gotoxy(29,30); printf("\n[2] - SRTF"); gotoxy(29,35); … | |
What is the function of fflush(stdin)? What for the operator -> used? | |
I am having troubles with a program I wrote to count letters in a string. Here is the program: [code=C]#include <stdio.h> #include <stdlib.h> #include <string.h> int i; int length; int ascii; char cipher[3]; int letters[26]; int main() { char cipher[10] = "ABC"; /*Or an inputted variable, but that's not important … | |
i wrote a program with switch statements and now i have to write with while loop the same programram. Please say me where i am worng. my if program: [code=c] char letter ; printf("enter the antibiotic sample >>>>> "); scanf("%c", &letter); switch (letter) { case 'N': case 'n': printf("Perform standard … | |
I am currently trying to write a program that: [quote]Write a program to count and print out the number of copies of the letter 'e' that are found in a pre-specified string. (By "pre-specified", I mean you should declare and initialize the string right in your program, rather than reading … |
The End.