15,551 Topics
| |
[B]this program is to find maximum and minimum using divide and conquer technique[/B] [CODE=C]int min=32000,max=0; void maxi(int [],int,int),merge(int [],int,int,int,int); void main() { int a[30],n,i; printf("enter the limit\n"); scanf("%d",&n); printf("enter the aray elements\n"); for(i=0;i<n;i++) scanf("%d",&a[i]); maxi(a,0,n-1); printf("maximum is %d and minimum is %d\n",max,min); getch(); } void maxi(int a[],int first,int last) { … | |
#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #include<math.h> #define TRUE 1 #define FALSE 0 int t=1; int place(int k,int n); int queen(int k,int n); int x[5];//index for column and value at that index is row number int place(int k,int n) { int j; for(j=1;j<k;j++) { if((x[j]==x[k])||(k-j)==abs(x[j]-x[k])) { //printf("hi\n"); t=0; return t; } else … | |
I am trying to write a variable argument function on SUN solaris. According to MSDN, the _vscprintf function that I'm using on windows should work on unix as ANSI is listed. [b]_vscprintf[/b]<stdio.h>ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP [size=2]However, including stdio.h doesn't seem to help. Is … | |
how can i write a program to print username and password if the minimum and maximum length of password are 5-15 respectively. please give me answer as soon as possible | |
On the payroll pointers program, I am struggling with a few things on the program. The data from the terminal uses malloc, for an employee node. Dynamic Memory Allocation is used in the program. For the name of each employee I can put in the First Name or First and … | |
I have this program that counts characters in a string is there a way to modify this code so that for example it counts specific characters entered. Exmaple.. user entered Hello, and I wanted the program to say there are 2 "L"''s entered in that word. THanks for your help! … | |
Hello All, I'm new here, and glad to be part of this wonderful and helpful site. I'm trying to allocate a new array (lets say of size 10) inside a struct. I want to do it this way: [code=c] #include <stdlib.h> #include <stdio.h> typedef struct Circle { int *x; int … | |
Hello, Can someone explain me what does this mean? "40[^\"], %*c" Thanks | |
hello! just started out here... i need help with this program i need to generate a 3*3 matrix having unique numbers in the range 1-9. I did this program using srand but i'm unable to get the correct output...i couldn't figure out the error...could someone plz help me?? here the … | |
I am trying to make dir command .I have a problem in my code.it print name of all subdirectories and files but it does not print all files of all subdirectories only print one subdirectories files. I want to print all file and all subdirectory files Void list(const char *path) … | |
hii can anyone plz tell if there exist any libraries in C which helps in monitoring the data traffic of the system. want to write the code for it... thanks in advance | |
I've got a slight problem with a function I'm writing. I'm trying to pass a 2d array to a function whose sole purpose is to display the contents of said array. Now, what I'm about to give you all compiles, but my compiler (bloodshed's dev-c++ v4.9.9.2) is giving me "warnings". … | |
Guys can anyone of you points me in the right direction. I got the source code of a function (int function(....){....}) which i am generating at runtime which i wish to compile to a DLL at runtime is this possible? If so can you point me in the right direction. … | |
Hello! I want to know on how to convert files like JPEG to .PRN. Please help me. Anyone who is familiar on how printer drivers work. Thanks! | |
Heya. I'm having a problem with my guessing game. It won't stop guessing even after getting the right answer, and it also prints both questions no matter what the user input is. The guessing game is one where the computer guesses the user's number...any help? [code=c]#include <stdio.h> #define max 200 … | |
what are the image compression algorithms ? how to implement a new image compression algorithms ? can u give some tips to develop the code? | |
Hi all Tried to link fftw3 in cygwin, but keep on getting error messages such as: fftw3_prb.o:fftw3_prb.c:(.text+0x121): undefined reference to `_fftw_malloc' As an alternative, I just used an example from the web, here [url]http://people.sc.fsu.edu/~jburkardt/c_src/fftw3/fftw3_prb.c[/url] compile is using $ gcc -lfftw3 fft -o fftw3_prb fft-lib.o fftw3_prb.o ... and link it using … | |
hi everyone i would like to fill an array with random numbers i know i can use the next line srand( time(NULL) ); return 1 + rand() % 10 ; but the problem is that it fills my array with only one number what can i do ? | |
can any one say the important c quetions at the timeof attending technical interview for freshers.....please reply ASAP | |
Write a C/C++ program to read a text file and count the number of occurances of the words present in the file. Display the words in sorted order (increasing order of their counts). Your program should be structured as follows: readFile.cpp: file handling file -- functions to read a text … | |
Hello1! First af all, excuse me for my bad english! I need to read user input that contains a certain command. My problem is that it depends on the command, the amount of strings i'll need to read. For example, there's a command with the following sintaxis: Command1 name = … | |
please can any one write the code without using pointers and in a simplest way... my question is finding substring position in main string .....these both strings you have to take at the run time and dont use any library methods.....you yourself have to write the code.....please give eply ASAP..... | |
Hello, I'm still a novice with this C programming and I got some problems with my program. I got 3 errors and 3 warnings with my Linked List. I attached an image for you to see. Someone can help me how to solve this problem? Here's my code: [CODE=C]#include<stdio.h> #include<stdlib.h> … | |
Everyone, I am having a problem with trying to get this to prompt the user for the correct input. I would like to user to be required to enter numbers only after it prompts him/her at "How much money would you like to convert today? (above 100): " My question … | |
HellOo I've started to write a simple code to seprates the input integer , for example , if tried to enter 4444 , then it will sperate them by a space to be 4 4 4 4 , so any idea? Thanks | |
i want the codes for read and write of image processing using matlab and itz urgent for me send it 2 me as soon as possible | |
only a beginner, please bear with me.. there are no errors, but wrong output assumptions: input is correctly formed array size is 20 single digits only 4 basic operations #include<stdio.h> #include<conio.h> #include<ctype.h> #include<stdlib.h> int stk[20]; void push(int a, int b) { stk[a]=b; } int pop(int a) { int b=stk[a]; stk[a]=NULL; … | |
Please assist Iam getting this "13 C:\Dev-Cpp\main1.c [Warning] return makes integer from pointer without a cast " from the program below when i try to compile it. [CODE]#include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> #include <math.h> int main() { /*getLarger();*/ /*getRandom();*/ printDetails(); getch(); return /*getLarger,getRandom,*/printDetails; } int printDetails() { … | |
Hello, I've a tricky issue with a use of my macro. I specify the max length of a string parsed by sscanf with a macro define. Since I write all of my macro value between parenthesis (if it is a number) It should fix the operation problems (it's why we … | |
The program that I want to do is a program that lets you deposit and withdraw money, and that it can display the total amount that you have inputted in the transaction. Now my problem is, I don't know how to display the total amount and how to do a … |
The End.