15,550 Topics

Member Avatar for
Member Avatar for celina1234

I have a 1000x24 matrix in a text file and i want to sum the adjoining columns of the whole matrix e.g. col1+col2, col2+col3, col3+col4,... col23+col24 and store these values in a separate text file. My code runs like this: #include <stdio.h> int main() { int i,j; float a[100][24]; FILE …

Member Avatar for Edward_3
0
233
Member Avatar for COKEDUDE

I need some ideas on my array of struct implementation. This is what I have in my structs. I plan on making SHAPES an array because I will have multiple SHAPES. Each shape will have multiple x and y coordinates. Because of this I'm not sure if should make a …

Member Avatar for Schol-R-LEA
0
470
Member Avatar for myk45

Hi all, I have a problem where i need to find to what library my code links to. Here is the scenario: a) I have two executables. Both link to pthread. But pthread seems to behave differently. b) I am not sure that they are linking to the same version …

Member Avatar for L7Sqr
0
150
Member Avatar for devnar

I'm using the following swap function to swap two elements of an array. The element pointed to by 'x' and 'y' and the one right below it, to be particular (then i want x and y to point to the second of the swapped elements, hence i use auto increment). …

Member Avatar for anveshnaidu
0
160
Member Avatar for Xavier_1

Hi guys!, I have a code here having a problem about double and I'm kinda lost so I don't know what to do. btw thanks for reading my thread, I would greatly appreciate if you can help me fix this thing. #include <stdio.h> #include <conio.h> #include <string.h> #include <stdbool.h> #define …

Member Avatar for Moschops
0
196
Member Avatar for Perry31

Hi, I'm facing some problem while returning string. I want to return final string value and print it. Below is the code that i tried, int main() { int Input = 0; //Tried using tmpstr also //char *tmpStr = NULL; scanf_s("%d", &Input); //Tried as below also but it was crashing …

Member Avatar for Perry31
0
189
Member Avatar for oanahmed

Hi! Few days ago, I had learned C language. It took me almost 8 to 10 months to learn the whole language. Now I wanna want to make real world applications using it. I'm an Ubuntu user or more generally a Linux user. The point to ponder is that I …

Member Avatar for DeanMSands3
0
3K
Member Avatar for kxjakkk

I'm trying to make a calendar out of C. I need it to be able to promt the user for a month, and the year, and it should then print the calendar of that. So far the code I've got is: #include<stdio.h> int days_in_month[]= {0,31,28,31,30,31,30,31,31,30,31,30,31}; char *months[]= { " ", …

Member Avatar for ddanbe
0
346
Member Avatar for Cy_Squared

1.Input three unique numbers and print the different of the highest and lowest numbers. 2.Input three integers a determine if there are equal numbers . If There are equal numbers, print the product of the equal numbers, Otherwise print the average of the numbers. 3.input three unique numbers and average …

Member Avatar for David W
0
662
Member Avatar for tingwong

Just started learning about buffer overflow attacks and had a question regarding something in this https://www.youtube.com/watch?v=EcMCiFwHnjE/ video. Why does the person write `jmpesp()` function (~1:38)? The function is never called anywhere in main so how does it appear on the `objdump` (~3:15)? Also, what is the point of the `jmp …

Member Avatar for deceptikon
0
154
Member Avatar for Daniel Angelo

Any Turbo C programmer out there that are capable of doing this for me :D I cant figure this out :D thank you and God Bless :D

Member Avatar for chriswelborn
0
73
Member Avatar for Daniel Angelo

I dont know how to program in Turbo C, My brother need a Hexadecimal Converter that's programmed in Turbo C ( Hex to Bin Hex to Oct Hex to Dec? )

Member Avatar for Daniel Angelo
0
117
Member Avatar for Daniel Angelo

I dont know how to program in Turbo C, My brother need a Hexadecimal Converter that's programmed in Turbo C Hexadecimal to Binary Hexadecimal to Oct Hexadecimal to Decimal ) Thank you for your help :D Good Bless!!

Member Avatar for chriswelborn
0
121
Member Avatar for EarhawkPH

I'm having problems with this program. Everytime i enter a fractional decimal number, it displays -0.0000 or sometimes garbage values. Ex: Enter any fractional decimal number: 5.7 -2.888blah blah blah garbage another Ex: Enter any fractional decimal number: 25.7 -0.000000 #include<stdio.h> int main(){ long double fraDecimal,fraBinary,bFractional = 0.0,dFractional,fraFactor=0.1; long int …

Member Avatar for David W
0
388
Member Avatar for kyle.mace.35

Alright so I am getting a weird problem with the following code int toDB[2]; int fromDB[2]; char * param1; char * param2; err = pipe(toDB); if(err==-1) { printf("Error on pipe creation: %d\n", errno); exit(1); } sprintf(param1, "%d", toDB[0]); err = pipe(fromDB); if(err==-1) { printf("Error on pipe creation: %d\n", errno); exit(1); …

Member Avatar for rubberman
0
1K
Member Avatar for kyle.mace.35

quick question how can I work around this char * dat = "08/11/2014"; char test[10] = dat; I need to be able to take a string and put it into an array of chars, how can i do this?

Member Avatar for deceptikon
0
222
Member Avatar for kyle.mace.35

How do I use pipes to communicate with another proccess that is being run using an execl command? I know how I can send info to that process but how do I get info back from that proccess? Some more information on what Im trying to do: I am trying …

Member Avatar for rubberman
0
2K
Member Avatar for Marumarsu

Hello, i'm new to C and i have no idea why i'm constantly getting 2293532 as the output value of %d. Any help is appreciated, thanks! #include <stdio.h> #include <stdlib.h> int main(void) { int friends; printf("How many friends do you have? \n"); scanf(" %d", &friends); printf("You have %d friend%s", &friends, …

Member Avatar for rubberman
0
120
Member Avatar for glao

Hello , why am I taking : > > *** glibc detected *** ./run: double free or corruption (out) #include <stdio.h> #include <stdlib.h> void func1(int **A ) { *A = (int*) malloc( 2 * sizeof(int)); for (int i = 0; i < 10; i++){ (*A)[ i ] = i; //printf("\nA …

Member Avatar for glao
0
879
Member Avatar for schzatprodn

here my script, please help me to resolve it :D thanks #include<stdio.h> #include<stdlib.h> #include<string.h> #include<float.h> int main() { /* KAMUS */ /* volume gas ideal = V=nRT/P -R= 8.314 P: tekanan (Pa/ N/m^2) = 8.5 V: volume ruang (m^3) n: jumlah mol gas (kmol) = 1.5 R: tetapan umum gas …

Member Avatar for schzatprodn
0
9K
Member Avatar for cse.avinash

Hello every one Can I have a better algorithm to find the nth prime number, where 1<= n <=5000000. for e.g., 1st prime number is 2. 10th prime number is 29. 100th prime number is 541. 1000th prime number is 7919. 10000th prime number is 104729. 100000th prime number is …

Member Avatar for vantrendin
1
6K
Member Avatar for samy_2

Maths Homework Input : Standard Input Output : Standard Output Time Limit : 2 sec Bob had got a ton of homework for the weekend that he has no time to verify whether he is getting right answers or not.So he decides to write a computer program for this as …

Member Avatar for rubberman
0
100
Member Avatar for chubbyy.putto

a program to count the number of occurrences of words in a passage. The program will read white-space separated words from a file, convert all words to a single case, and remove any non-alphanumeric characters from both ends of the words. It is to count the number of each word, …

Member Avatar for uonsin
0
209
Member Avatar for Sadiiiiiiiiee

hi i need help with my class assignment we're suppose to create a 4*5 grid, two player and three enemies. the grid is made up of coordinates and i am not allowed to use arrays. To start the game the players must enter their names and then go to (0,0). …

Member Avatar for cgeier
0
224
Member Avatar for Pyler

I'm almost giving up on this problem. How to convert an integer to it's hexadecimal equivalent. I'm not looking to printout the hexadecimal equivalent of the integer in printf() but for a hexadecimal number.

Member Avatar for Lardmeister
0
393
Member Avatar for nitin1

I was just thinking that why I need headers at all? In headers, most oftenly we have the declarations only. In .cpp we have the definitons of that .h file. But, why can't we write all the functions directly in .h file and include it in my project files? Why …

Member Avatar for Lardmeister
0
230
Member Avatar for chubbyy.putto

Here is what i got so far. I got stuck at white-space separated words from a file, convert all words to a single case, and remove any non-alphanumeric characters from both ends of the words. It is to count the number of each word, and then write to a file …

Member Avatar for rubberman
0
176
Member Avatar for 29hendrick

Write a program that finds the highest even integer among the values entered by the use. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "NO EVEN INTEGER". example: if the values entered were 3 8 1 6 3 4 …

Member Avatar for jwenting
-2
112
Member Avatar for sudesh.yadav.104

HI I donot understand where to start . I need ideas and help. void InsertList(c4735list *destinationList,c4735list *sourceList,node *startNode) { //=====================not implementd yet } this fn inserts source list into destination list.the nodes are inserted after the startnode in destination list.source list should be an empty list after this operation. the …

Member Avatar for sudesh.yadav.104
0
266
Member Avatar for Arjun_4

Hello everybody , i have a pending assignment and it is based on developing a Binary Search tree in C. One function which is required is Given As:- e. A function to convert the tree to a min-heap or a max-heap. Im really stuck guys , i dont have any …

Member Avatar for nitin1
0
551

The End.