15,540 Topics
| |
Hi. I'm having a little trouble figuring this problem out. What I need the program to do is take an email inbox and print out only the Headers for each message. Assuming each max line length to be 1024. I can read the file line by line but I don't … | |
Hey guys Im having trouble printing out a string. Could someone help me out? I would like to enter a string like: "julie perez" and print out "julie perez" but my program only outputs "julie". The code that prints out only "julie" is the following: practice.c: [CODE] #include <stdio.h> #include … | |
So what I want the code to do so far is take an expression lets say 35x + 17y = 5 and break it down into three values, 2 integers and a character. 35, 17, and + so I can tell it how to evaluate it. Here is my code … | |
hey do u know how to create shortcut for a file using c programming. | |
Trying to implement a stack using dynamic array. The Problem which i am facing is that if i a pushing 60 or 90 elements then the program is running fine but on inserting say 600 elements while printing the first two elements are showing junk value. Compiled the code using … | |
I don't normally post in these kinds of forums and prefer to just google my way through problems, but after 3 hours of trying to solve this, I am beat. I am working on a program that uses a linked list and can add/delete/print out nodes (orbs in this program) … | |
DOSRetCode = GetOpenSaveFile(►TARGET{PROP:Handle},►DOSDialogHeader,DOSTargetVariable,►DOSExtParameter ,DOSFileNameVar,1,►0) Where the black arrow is, thats where i get my error. the error says "No matching prototype available" i also get two more errors where the other black arrows are after the first one, they are, "Invalid variable data parameter type" And the last one is, … | |
what is the difference between declaration of a variable and definition of symbolic name in c language? | |
Hello Community i am using Linux (fedora) gcc compiler. Normally i use Java but for the Interprocess communication part we got C. My problem specifically is that when I read from a file with the fread() function and save it in a char buff[somesize] I cant use printf() to display … | |
I need to create a program for reading two numbers,printing them,confirming them and then summing them up. Here is my attempt [CODE]#include <stdio.h> #include <conio.h> void main() { clrscr(); int a,b,s; char c,d; s=a+b; printf("Enter any two numbers "); scanf("%d %d" , &a, &b); printf("The numbers you have entered are … | |
Hello, I had a question regarding nested structures. Lets say you *have* to use the following structures: (disregard the numbers thrown in, I just tossed random numbers in). [CODE] typedef struct info{ char name[20]; char address[50]; char serial[15]; } PERSONAL; typedef struct person{ PERSONAL individual[50]; int number; } PERSON; [/code] … | |
Hello ..i am trying to get the factorial of large integers but i get 0 every time i try,,can anyone tell me why ,,,Thanks in advance . [CODE]#include<stdio.h> #include<conio.h> int factorial(int n); //main main() { int x,fact; printf("Enter a positive interger \n"); scanf("%d",&x); fact=factorial(x); if (fact==-1) printf("the number is not … | |
Do you know that there is clean way of doing what C-language ternary operator ? does in Python's recent versions. It is if with special twist. The syntax is: [CODE]'The value if true' if <condition> else 'Value when false'[/CODE] Values can be any type. You can put this structure to … | |
hi can anyone tell me how to write the output of this code to a file?? [CODE] #include<stdio.h> #define MAX 10 char array[MAX]; void main() { void addvalues(); addvalues(); } //funtiocn that will allowe the user to add the values void addvalues() { printf("------------------------> Insearting List Elements <---------------------------\n"); int i; … | |
Hi, I have to somehow modify a C-code by introducing a new array. We are in the chemical field: I have a small molecule (guest) inside the structure of a larger one (host). The existing array stores the square of the distance between a specific class of atoms: they are … | |
Hello everyone, i need to enter a value into a savings account paying 7% interest and €1,000 is withdrawn from the account at the end of each year. How many years are required for the savings account to be depleted? here's wat i did, but the loop not working: [code=c]#include … | |
[CODE] char in[100], *temp[10],var[10][10]; int i, n = 0,fulval=0; double val[10]; var[10][]="ANS"; [/CODE] it should be simple but i cannot figure it out. I want to assign "ANS" to var[0][0,1,2] but it did not work? | |
İs it possible now to use a system call in module programming ? after I "make" the module below I am getting warnings like that no errors WARNING: "sys_getcwd" [/home....mod/mod01/mod01.ko] undefined! [code] /* * hello-5.c - Demonstrates command line argument passing to a module. */ #include <linux/module.h> #include <linux/moduleparam.h> #include … | |
Hi All, Can anybody explain here what is the different between normal function call and function to pointer call? How function to pointer is working internally? Why should we use function to pointer in call back? why not we call function call directly? Please pardon me ,if it is very … | |
hello hey i want to implement a program in c or c# for preemptive processor sharing tasks. can anyone plz help me out??? | |
Hello. This is my first post, and I am fairly new to C. I am writing a socket program and I am getting a segmentation fault upon runtime. My program compiles fine. I'm pretty sure it is due to my implementation of my data structure. My struct looks something like … | |
does anyone know whats wrong with my function? [CODE] void quarter(detailstype info[]) { int i,j; for(i=1; i<4; i++) { printf("for month: %d", info[i].month); for(j=1; j<emp; j++) { info[i].qt1=info[j].sal_amount+info[i].qt1; } printf("%f", info[i].qt1); } }[/CODE] it is giving me this error: error C2111: pointer addition requires integral operand | |
Gday all, I am studying/part time teaching C++ in an australian technical college. I have been asked to write a problem and solution for a class of young students. This is what i have so far: The header file 'DIGI_O.OBJ' contains functions 'void setup(void), 'int Ain(void)' and 'void Bout(int)'. The … | |
Hi, I have a question regarding a program I'm writing in C. I have a few variables which I would like to assign a random number to. However the sum of all the numbers I assign should equal 1. I have not been able to find a way to do … | |
i have an unhandled exception cx0005:access violation in VC6++ while i try to run my c code with main.exe it gives a window showing to send a error report or to debug, while i give debug, it takes to fwrite file an breaks at the point --> if (anybuf(stream))//this is … | |
hie all, i needed to make a code in simple turbo c for ethernet packet injection as well as data reception. I tried the code in windows but its not working. possibly due to linux based commands. plz help me.. | |
Hey all, I am pretty new to C and am trying to make a basic HTTP server to learn more about sockets. I managed to get the sockets working fine, and sent some data to the browser when I hardcoded the data. However I am now trying to read from … | |
[CODE]#include <stdio.h> int main(void) { int a,b,c; printf("Enter the sides of the triangle"); scanf("%d%d%d",&a,&b,&c); if(a+b<c || b+c<a || c+a<b) printf("cant form a triangle"); else if(a==b==c) printf("eq triangle"); else if(a!=b && b!=c && c!=a) printf("sca triangle"); else if(a==b&&b!=c || a!=b&&b==c) printf("Iso triangle"); } [/CODE] am starting to code.. i have coded … | |
Here is my assignment rules, i am stuck and cannot find what it is i am doing wrong. If some one could help me i would appreciate it * The main routine must be a 'manager' routine, which means o The function can declare variables o The function can call … | |
Hello everyone my task is to write a [COLOR="Green"]program that reads quizzes from a file 'q.txt', randomly selects a number of questions, and presents them to the user one-by-one, collecting user answers. After user has answered all questions, program gives user the score. [/COLOR] please can someone give me the … |
The End.