15,550 Topics

Member Avatar for
Member Avatar for gyagyus

Hi! I need to find out the size of an arbitrary file and then binarize it in C. I can do this with txt files, but how could I generalize it? This is how I get the size: [code] const char* filename = argv[2]; ifstream messageFile(filename); beginFile = messageFile.tellg(); messageFile.seekg …

Member Avatar for gyagyus
0
102
Member Avatar for emj83

could anyone help me with the code to extract a matrix from a file? i would also need to be able to know the dimensions of the matrix i am extracting. thanks in advance

Member Avatar for nucleon
0
33
Member Avatar for qinise4

I have written the below code in C ,the problem I have one proccessor and I am not sure if it will work, [code=c] /*#include &ltstdio.h> #include &ltstdlib.h> required for randomize() and random() #include &ltconio.h>*/ #include <stdlib.h> #include <stdio.h> #include "mpi.h" #include <math.h> //int N = 8; /*typedef struct { …

Member Avatar for qinise4
0
165
Member Avatar for Deepak.G

im not sure if this is the right place to post this doubt.. i have installed this cint interpreter 5.15 think is i dont want those many options and i want to reduce it to the bare minimum...but the thing is im not very strong in c/c++ and this whole …

Member Avatar for ArkM
0
210
Member Avatar for BimanD

What is enumeration? What is the difference between call by value and call by Referance? With examples?

Member Avatar for Ancient Dragon
0
54
Member Avatar for prashanth s j

Hi all, consider the below code snippet: struct ips { int i; }; struct ips * ipsptr; int * ptr; ipsptr = (struct ips * ) malloc(sizeof(struct ips)); ptr = ipsptr; free(ptr); what is the effect of the code above? Does it cause memory leak? Please suggest how it happens …

Member Avatar for Ancient Dragon
0
46
Member Avatar for shaieen

[B]i research a code, and it goes like this:[/B] [code=c]include<stdio.h> #include<conio.h> void main() { int a[12],b[12],c[12],i,j=0,k=0; clrscr(); printf("Enter 12 numbers\n"); for(i=0;i<12;i++) { scanf("%d",&a[i]); } for(i=0;i<12;i++) { if((a[i]%2)==0) { b[j]=a[i]; j++; } else { c[k]=a[i]; k++; } } printf("The even numbers are\n"); for(i=0;i<j;i++) { printf("%d\n",b[i]); } printf("The odd numbers are\n"); for(i=0;i<k;i++) …

Member Avatar for shaieen
0
147
Member Avatar for XWDxel

Hello guys, I'm new to this forum so let me know if there's something wrong with my message. I've recently bought a new computer: [Windows XP SP3 x32, Intel(R) Core(TM)2 Duo CPU, E7400 @ 2.80GHz, 1.60GHz, 2.50GB of RAM, Physical Address Extension]. After installing Turbo C 3.0, I tried to …

Member Avatar for Salem
0
166
Member Avatar for Dewey1040

I'm studying sequential set representation, and one of the only lines in the code that i cant figure out is this [code=C] #define MAX(a,b) (((a) > (b)) ? (a) : (b)) [/code] i get that MAX if a function with two operators, a and b but i dont really understand …

Member Avatar for Dewey1040
0
71
Member Avatar for mikemea

[B]cannot convert parameter 1 from 'char' to 'char *'[/B] calcCharges(type_of_gas, &rate_of_gas, number_of_gallons, &total_gas_of_price, car_wash, &price_of_car_wash, &total_cost);

Member Avatar for GDICommander
0
72
Member Avatar for Dewey1040

I'm still generally new to C, I understand most basic concepts, and were now starting to learn much more complex tasks. Right now im stuck on a program to add polynomials, using linked lists. My book Data Structures - An Advanced Approach Using C, is a real difficult read, and …

Member Avatar for Dewey1040
0
96
Member Avatar for SADIYA4

hey how to make an object move in an C graphics program, eg; i have drawn a swing and i want it to move... i am beginner in C graphics program so please help me...:(

Member Avatar for csurfer
0
52
Member Avatar for otterfreak

Hi guys, i'm working on trying to pass commands from the console from one program to another program by using pipes() and the execve() system calls. I'm pretty much stuck right now, because I can't seem to determine what i'm doing wrong. Here are my code listings [code] #include <errno.h> …

Member Avatar for Salem
0
1K
Member Avatar for daniellamae

uhm, i really need help on recursion problems, and the first problem before my assignment is me because i really dont know how to do it, or how to construct it successfully... this is my assignment: a program that will read 10 integers,display them as inputted and in reverse order, …

Member Avatar for csurfer
0
124
Member Avatar for ronizam

print the decimal, octal and hexadecimal values of all character between the start and stop character entered by user, For example, if the user enters and 'a' and 'z', the program should print all the character between 'a' and 'z' and their respective numerical values. make sure that the second …

Member Avatar for Dewey1040
0
116
Member Avatar for ronizam

hello...i am new here and also new in IT enviroment, try to do my assignment as below Write C program that accept a character using scanf () function,if the character is lowercase letter,convert to uppercase letter and display the letter in its uppercase form, if the character is uppercase, convert …

Member Avatar for csurfer
0
97
Member Avatar for bossie09

im writing a calculator programme for my project. But i dont know how to find Tan, Cos, Sin. Any one can help I would appreciate that. what is the formula

Member Avatar for csurfer
0
167
Member Avatar for bigOnotation

Hi I am new to c programming language, I have written this small code and I dont know why cant i use the free() here, any clarification highly appreciated. [code=c] int insert(element **head, int d) { element *temp; temp = (element*)malloc(sizeof(element)); if(temp == NULL) { printf("\nError: Failure to allocate memory\n"); …

Member Avatar for nucleon
0
93
Member Avatar for aries_rupali

hie im Rupali im doing my final yr project using IVR for car dial. I have no idea from where to start. Can someone please help me how to write code and how to write it in C.

Member Avatar for Luckychap
0
63
Member Avatar for chriscross86

hi, there...ive come up with these codes and they work.but i dont know how to modify the program so that it prints sequence of asterisks in a single line based on the input gained using : 1.while 2.do-while 3.for please help... #include <stdio.h> int main() { int x; printf("Enter an …

Member Avatar for Dewey1040
0
99
Member Avatar for 6ky8ngel

i'm having error while compiling my code.. key_c_xor = userKeyArray[t]^C[i]; long long int key_c_xor[8]; int userKeyArray[4]; long long int C[36]; the error that i got was: error C2109: subscript requires array or pointer type anyone know how to fix it? thanks

Member Avatar for nucleon
0
40
Member Avatar for marconi0708

Hi, The clock synchronization program below needs to be amended to add another clocksync.ini option to allow the progam to run just once and then terminate. Request you to please give your inputs for this. Thanks, Marconi. -------------------------------------------------------------------------------------- [code]#define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0400 #include <windows.h> #include <winsock2.h> #include <stdio.h> #include …

Member Avatar for Salem
0
104
Member Avatar for marconi0708

Hi, Can you please help me what changes are required in an already existing Clock sycnchronization Program in C to add a txt.ini option in it which allows the progam to run just once and then terminate. Thanks. Marconi.

Member Avatar for Ancient Dragon
0
65
Member Avatar for bemo55

Hello! I was having trouble with this program i keep getting undeclared identifier errors for my seat array and my seatnumber variable. I was also wondering if i was going about writing this program the right way. Arrays are kinda new to me. This is the problem (Airline Reservatins System) …

Member Avatar for zalezog
0
126
Member Avatar for tendolm

# include “udf.h” /* definition variables LTIME =local time, SMER=standard meridian on which local time is based (in degrees), LMER= meridian of the observer (in degrees), N = nth day of the year*/ #define LTIME 12:00 #define SMER 116.25 #define LMER 123.44 #define N 173 DEFINE_PROFILE(heat_flux, t, i) { Real …

Member Avatar for nucleon
0
144
Member Avatar for bussaina

How do this Print the decimal, octal and hexadecimal values of all characters between the start and stop characters entered by a user. For example, if the user enters an a and z, the program should print all the characters between a and z and their respective numerical values. Make …

Member Avatar for Ancient Dragon
0
304
Member Avatar for riahc3

Hey Im already generating numbers correctly from 0 to MAX_INT. But Id like to know how can I change that range (including negetive numbers) And while already on the subject, why does this code only generate numbers in the VERY high 90s? [code] int main() { int array[100]; srand(time(0)); gen(array); …

Member Avatar for Rashakil Fol
0
128
Member Avatar for jared717

I am new to C. I won't to understand how this program works. I found it and don't understand how to run it. When I do it says: Missing name for redirect. Here is the code. [CODE] #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { FILE *from, *to; …

Member Avatar for abhishaki
0
194
Member Avatar for bhavya_talluri

hi i just want to know how to write a c program for heap sort. please help me

Member Avatar for abhishaki
0
112
Member Avatar for Alex_

Hello everybody, i need a polygon formula to draw one. I want to make a function that will draw a polygon , depending on how many vertex's it has. I'm not good at math so i can't figure it out how to do it. Though, i do understand that it …

Member Avatar for Alibeg
0
174

The End.