15,552 Topics
| |
I am trying to run this program but it is giving "unable to open socket" eror. i am running this program on a server via putty which is hosted in my univerity server with wireless network. the code is : [code=c]#include <pthread.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <stdlib.h> #include <sys/socket.h> … | |
I am trying to write a program that accepts a dollar rate and hte accepts a list of amounts adn converts tehm to Shekels and prints in a list with the sums. HEre si my code: It is giving em lots of errors and I am having no luck. I … | |
This is a [B]toupper[/B] and [B]tolower[/B] implementation for whole c-strings, without making use of the existing [B]toupper[/B] and [B]tolower[/B] functions for characters :) [U] example:[/U] [CODE=C]char s[]="Hello, beautiful world!"; stoupper(s); // s now contains: `HELLO, BEAUTIFUL WORLD!´ stolower(s); // s now contains: `hello, beautiful world!´[/CODE] | |
Hello all!! i have to make a program for my university that generates 3000 random numbers and finds the one who are powerful! I have written all of the code but i don't know what condition is wrong! let me show you... :-P [CODE]for (l=4 ; l < COMPUTATIONS ; … | |
the header file: [code] #include<stdio.h> struct IntArray { int schedule[30000]; int nSize; }; struct IntArray getSchedule(int browsingTime[], int noOfPersons, int timeSlot); [/code] the implementation file: [code] #include"leastremainingtime.h" void sort(int *a,int n) { int i=0,j=0,temp=0; for(i=0; i<n;i++) { for(j=0;j<n-1;j++) { if(a[j] > a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } } … | |
hi everyone I'm trying to listing files/drives/folders in pc but I couldnt find anything. please help me .. --[ cryptacker ]-- | |
This demonstrates how to get a list of your computer's logical drive letters under the MS-Windows operating system. | |
Hey, I needed to delete a file created by a child process and our prof suggested that I use the system() command to do so. I 'manned' system but cant find anything useful on how to use it to delete an opened file. Can anyone suggest as to how this … | |
#include<stdio.h> #include<conio.h> void main() { int a[10][10],b[10][10],c[10][10],i,j,k,m,n,p,q; printf("Enter The Rows And Cloumns in the Matrix:"); scanf("%d %d",&m,&n); printf("\nEnter Elements Of The Matrix:\n"); for(i=0;i< m;i++) { for(j=0;j< n;j++) { scanf("%d",&a[i][j]); } } printf("The First Matrix Is:\n"); /* Print the first matrix */ for(i=0;i< m;i++) { for(j=0;j< n;j++) printf(" %d ",a[i][j]); printf("\n"); … | |
void main() { int a[10][10],b[10][10],c[10][10],i,j,k,m,n,p,q; printf("Enter The Rows And Cloumns And Of The First Matrix:"); scanf("%d %d",&m,&n); printf("\nEnter The Rows And Cloumns And Of The Second Matrix:"); scanf("%d %d",&p,&q); printf("\nEnter Elements Of The First Matrix:\n"); for(i=0;i< m;i++) { for(j=0;j< n;j++) { scanf("%d",&a[i][j]); } } printf("\nEnter Elements Of The Second Matrix:\n"); … | |
Hello. Please, i have this little question of finding the product of two matrices in which the user enters the number of rows and columns. i would appreciate it if a solution is given and even more if there are more than one solutions to the question. thanks. | |
Hi, i like to know what are the different systems that have gstreamer built in, or systems which allows gstreamer to be installed. I also like to know what this below lines specifies: I found this in my shell of proc/version file Linux Version 2.6.9-5.Elsm gcc version 3.4.3 20041212 (red … | |
hi, Im coding a sodoku program base on backtracking, but somehow it did not work as what I expected, can help me figure out what's the problem? [CODE]sodoku.c #include <stdio.h> #include <stdlib.h> #define true 1 #define false 0 void printGrid(int board[]) { int i,j; if (board==NULL){ printf("No Solution\n"); return; } … | |
hey guys, i programmed a bubble sort function in C and it doesnt seem to be sorting properly. Ive searched the forums and have seen similar posts and tried them but they dont work. :( Hoping someone could look over it to see if the concept/sytax is right. [CODE] typedef … | |
So I have part of my code done and I'm stuck on how to sort structures. This is the code i have until now. Its supposed to ask the user 3 things title, artist name, rating of song and im supposed to ask the user to sort them in certain … | |
I wrote this very small program that works fine until I remove the comments for the fprintf function. Basically the program will prompt the user for a numeric value, when the user guesses right(1234) the program exits. When I remove the comments the program never exits...Does anyone have any idea … | |
So I am suppose to write a program that will implementing one method if computing checksums for a file containing integers. I am executing the program by a command line from the following form: p4a inputfile outputfile I can compile the program in Dev C++ compiler with no errors. But … | |
I'm having trouble with a forking program. One process writes to a file, the other waits for the file to be written, prints something out, then deletes it. They essentially process in order based on whether the file is there or not. The processes should be outputting more useful information … | |
Hi, I am trying to make a server-client program about a bank. When a client connects to server , he has to send a character so as to define the operation like 'D' for create account. And I would like when client sends q to terminate . The character is … | |
Hi all; I am so new in C.I have problem about array .I want to remove same element in array but i dont know how can i do. Can anyone help me example : 1,2,3,5,67,31,13,5,2,1,1,4, the program should produce -->>1,2,3,5,67,13,31 | |
Hi there, This is my first time working with an unsafe language, so naturally my first code would be full of memory-related bugs. I still have no idea how I ought to approach some of the problems I've been getting, and I've been resisting asking for help as much as … | |
As part of my program, I have defined and initialized a structure. But when I compile it, gcc gives me the following error on all the initialization " initializer element is not constant". Anyone know why this is the case? [code] struct RECORD { char* username; char* password; char* type; … | |
Hey everyone, I have a job interview coming up and despite the fact that most of the job is in C++, they want me to do the interview test in C which I have no experience in, not to mention my C++ is kinda rusty. Now I would normally have … | |
Hello. Please, i have this little question of finding the product of two matrices in which the user enters the number of rows and columns. i would appreciate it if a solution is given and even more if there are more than one solutions to the question. thanks. | |
Hello. I have a question about Const Int and Points I have this code [code] const int j=18; int *k= (int)&j; *k=110; printf("Data: %d -> %d; %d : %d-> %d\n", &j, j, k, &k, *k); [/code] this well return for me [b]Data: 2280676 -> 18; 2280676 : 2280672-> 110[/b] but … | |
So I finally get to the end of this evil program, and then it won't compile because it says "type double not expected". Here is my error message in its entirety: program 3 item.cpp(111) : error C2062: type 'double' unexpected program 3 item.cpp(121) : error C2062: type 'double' unexpected program … | |
please can someone tell me the source code of a c program? the program is "create a c program to print the employee pay revision list using arrays and functions and structure" please do reply fast as i need help urgently | |
can somebody explain the behaviour of the statement printf("%d"); is it any where depends on the statements that present before or after it. i have some satatements that allocates memory dynamically. its printing one of that value. is there any proper reason for undefined behaviour. | |
[CODE] #include <gst/gst.h> #include <stdbool.h> static GMainLoop *loop; static gbooleanbus_call (GstBus *bus,GstMessage *msg, gpointer user_data) { switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_EOS: { g_message ("End-of-stream"); g_main_loop_quit (loop); break; } case GST_MESSAGE_ERROR: { gchar *debug; GError *err; gst_message_parse_error (msg, &err, &debug); g_free (debug); g_error ("%s", err->message); g_error_free (err); g_main_loop_quit (loop); break; … | |
hi im trying to write some code for a priority queue using an unsorted array..it should be easy but i have a few concerns about it.. say if i have a graph of something like this: node 0, priority 100 node 1, priority 50 node 2, priority 200 node 3, … |
The End.