15,552 Topics
| |
There is a small problem i have there is a small error that i didnt use to have with the boorland compiler I'm using xcode these days and in my switch case im trying to execute a function (as you can see, the "main" function) however it says that it … | |
#include <stdio.h> #include <string.h> #include <conio.h> #include<stdlib.h> int fstock1, fstock2, fstock3; int opt1, opt2, cCost, length, gTotal; int stock1= 5; int stock2= 10; int stock3= 15; //--------------------------------------------------------------------------------------------- void welcome() { system ("cls"); printf ("\n ||||''|| . ...\n"); printf (" |||| ||| |||''|| '||| |||. .|| ||| .||''||.\n"); printf (" |||| … | |
I have no idea hw to approach this... i need to end my program, shown below by the user pressing the letter Q on the keyboard. Help? #include <stdio.h> #include <stdlib.h> float subtract(float x, float y); int main (void) { float x, y; printf("Please enter a real number:\n"); scanf("%f", &x); … | |
I read the following points related to side effects in gnu c manual it is necessary for the following points to hold true between two sequence points: 1.an object may have its stored value modified at most once by the evaluation of an expression 2.the prior value of the object … | |
I think that the problem is in lines 59-63 #include <stdio.h> #include "genlib.h" #include "ctype.h" #include "simpio.h" #include "string.h" typedef struct{ char name[30]; long sell; double supply; }domiT; void ypologismoi(domiT stx[],int *p,FILE *infile); void emfaniseis (domiT stx[],int *p,FILE *outfile); main() { int p; FILE *infile,*outfile; domiT stx[100]; ypologismoi(stx,&p,infile); emfaniseis(stx,&p,outfile); system("pause"); … | |
How to find this series without using power function in c 1+x/1!+x2/2!+x3/3!+x4/4! please help me out i'm unable to solve these type of questions | |
I have an assignment in which i have to add, subtract, multiply and divide two complex numbers and i am very confused as to how to create the program. This is what i have got so far.. #include <stdio.h> #include <complex.h> int main (void) int real, imag; { complex a, … | |
There is error in this program it's not showing the correct output so help me out by modifying it. #include <stdio.h> int power(int n1,int n2); int main() { int base, exp; printf("Enter base number: "); scanf("%d",&base); printf("Enter power number(positive integer): "); scanf("%d",&exp); printf("%d^%d = %d", base, exp, power(base, exp)); return … | |
In the book called gnu c manual I read that the following code has an undefined behavior `i=++i +1`; Because since the variable i is modified more than once between the sequence point,it is not sure that what value will 'i' have..But it is evident that the final value in … | |
Hey everyone I was working on a small tool and also refreshing my programming skills. my problem is I want to pick a random number from 60,000 to 200,000. it does that but the number it displays are not dramaticly changed. For example if it out puts 062045, i hit … | |
Dear Internets, I am currently trying to write a program that can extract the "header" from a FASTA file. and then output a portion of the header to a new file. The part of the header i need is the "CONTIG_X" part. When I run this program it prints duplicates … | |
hello i have the following file: 11 Lockers, Daniel;Engineer;53500 Adamson, John;Manager;77500 Newhall, Bob;Programmer;40000 Brown, James;Clerk;28000 i need to put each employee into a struct and then each struct into an array. so far i did this: else { fscanf(sourcefile,"%d\n",&count); printf("%d\n",count); Array=(employeeType *)malloc(sizeof(employeeType)*count); for(i=0;i<count;i++) { fscanf(sourcefile,"%s",Array[i].name); fscanf(sourcefile,"%s",Array[i].job); fscanf(sourcefile,"%d",&Array[i].salary); } } for(i=0;i<count;i++) … | |
how to print the foll string without using any kind of variable "How are you %dad%" | |
Dear all I write bubble sort program for inputing 9 numbers. However, when compile and run it, it only allows me to input one number only. Could anyone see any fault in my code? I think the problem is on the first loop. #include <stdio.h> int main(void) { int num1 … | |
am frederick sekyi and am new to this website.can any of you help me with computer programing? | |
I am working on a project about data mining. my company has given me 6 million dummy customer info of twitter. I was assigned to find out the similarity between any two users. can anyone could give me some ideas how to deal with the large community data? Thanks in … | |
How to make simple games in c language? did any one of you can help me to build a game? | |
My program is nearly done.But my function SumN doesnt print the correct output. SumN have to output the Sum of numbers that belong to the interval [a;b]. Example: input a=1 b=10 1 4 13 45 10 output sum=15 but im getting 60 and in should be 15. Can sameone help … | |
I need to convert a DWORD into 4 bytes to send to serial RAM. All the examples of using SPIRAM, EEPROM and FLASH use `*variable` to send and receive. I can break the DWORD down into bytes which I stuck in a `char[3]`. I don't, apparently even with all my … | |
I have a problem. It is to generate a C code Please tell me how to display a image file on the screen in C? If u r kind to me, send the code | |
How to find this series without using power function in c 1+x/1!+x2/2!+x3/3!+x4/4! please help me out i'm unable to solve these type of questions | |
Hello, I am fairly new to c and i am finding it hard to spot why a part of a program I am making is not working. The program lets you work out the area and circumference of a circle. This is the code: #include <stdio.h> #include <math.h> int area() … | |
Hi, I hope someone can help me with a problem that I am currently stuck on, basically I am trying to create a file archive utility which can archive 1 or more file each specified in a command line into a file. My problem which I am currently stuck on … | |
Dear all, I m a newbie in C. When do the questions in "C Programming for Absolute Beginners" (MICHAEL VINE, 2008) When talked about structure programming, there is a question. Write A function that prints an ATM menu—it receives no parameters and returns no value. Void displaymenu() /********************* Function Prototypes … | |
When I use void main in the code it compiles successfully but gives an runtime error on gcc compiler..But when void is replaced by int then it doesnot show any errors.What is the reason behind this behaviour? | |
Hi, In openssl, X509_STORE_add_cert() would add a certificate to the list of trusted certificates in the ctx. What is the way to remove a certificate from this trusted store? Am not finding any function to remove the certificate. Can anyone of you suggest a way to remove the certificate from … | |
Dear all, I am a newbie in C. Just come across function prototype. I have a task in write a function prototype for: * A function that finds the larger of two numbers and returns the result and i write the following. #include <stdio.h> /* Function Definition, I do not … | |
i have an array of strings (2D array). i am taking input of strings and that strings can be same with strings which i have inputted before that string. so i want that i don't enter that string which is already being taken into array. so how can i do … | |
hello i have some a problem with malloc, here is my code: int add(int m,int n) { int **pina, **pinb, **pinc; int c=m*n, i=0, j=0; pina=NULL; pinb=NULL; pinc=NULL; free(pina); free(pinb); free(pinc); pina = (int **) malloc (sizeof(int *) *c); pinb = (int **) malloc (c* sizeof(int *)); pinc = (int … | |
In our university following registration numbers are assigned to students 786-FBAS-BSSE-F12 Where 786 is student ID, FBAS is faculty, BSSE is degree program and F12 is Batch. Write a program that reads registration numbers of 20 students. Use array of structures for storing student information. Provide user with following menu … |
The End.