15,550 Topics

Member Avatar for
Member Avatar for mvmalderen

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]

Member Avatar for William Hemsworth
0
3K
Member Avatar for adiaforos

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 ; …

Member Avatar for adiaforos
1
166
Member Avatar for want_to_code

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; } } } } …

Member Avatar for want_to_code
0
113
Member Avatar for fatalblade

hi everyone I'm trying to listing files/drives/folders in pc but I couldnt find anything. please help me .. --[ cryptacker ]--

Member Avatar for Ancient Dragon
0
143
Member Avatar for Ancient Dragon

This demonstrates how to get a list of your computer's logical drive letters under the MS-Windows operating system.

Member Avatar for Ancient Dragon
2
897
Member Avatar for shakunni

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 …

Member Avatar for marco93
0
92
Member Avatar for Vishu Madaan

#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"); …

Member Avatar for Ancient Dragon
0
93
Member Avatar for Ankush dhingra

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"); …

-5
75
Member Avatar for imolorhe

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.

Member Avatar for Calipe
-5
204
Member Avatar for Iam3R

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 …

Member Avatar for gerard4143
0
106
Member Avatar for Justea

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; } …

Member Avatar for dkalita
0
69
Member Avatar for matrix0978

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 …

Member Avatar for matrix0978
0
239
Member Avatar for yasaswyg

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 …

Member Avatar for dkalita
0
201
Member Avatar for gerard4143

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 …

Member Avatar for gerard4143
0
130
Member Avatar for cabosun

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 …

Member Avatar for gerard4143
0
79
Member Avatar for thure

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 …

Member Avatar for thure
0
113
Member Avatar for bufospro

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 …

Member Avatar for bufospro
0
113
Member Avatar for tasosa

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

Member Avatar for tashfeen
0
235
Member Avatar for thure

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 …

Member Avatar for Aia
0
165
Member Avatar for shakunni

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; …

Member Avatar for shakunni
0
126
Member Avatar for Bandin03

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 …

Member Avatar for Bandin03
0
124
Member Avatar for imolorhe

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.

Member Avatar for FIG-GHD742
0
108
Member Avatar for FIG-GHD742

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 …

Member Avatar for Aia
0
127
Member Avatar for A Tripolation

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 …

Member Avatar for banders7
0
233
Member Avatar for leena_gc

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

Member Avatar for sheikaman
0
163
Member Avatar for Iam3R

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.

Member Avatar for Tom Gunn
0
111
Member Avatar for Iam3R

[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; …

Member Avatar for Iam3R
0
88
Member Avatar for ssDimensionss

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, …

Member Avatar for ssDimensionss
0
172
Member Avatar for alvalany

hi friends, I wanted to do something like creating an executable file like a installation file . I don't want to do anything hardcore :) Just I have to copy the html file into a user defined directory in the computer and set the home page of the default browser …

Member Avatar for alvalany
0
56
Member Avatar for ninja_girl

Hello, I'm a C newbie (first time using C at university) and after reading a few books, I still have problem implementing & understanding structures and pointers. I have the following structure: [CODE]typedef struct data { double average; }Tdata; Tdata stat = {0};[/CODE] Now I have two functions which are …

Member Avatar for Ancient Dragon
0
88

The End.