15,552 Topics
| |
Hi everyone! I have a task that needs to be made in C in Linux. I use Kubuntu. This is the task: Process (coordinator) creates 10 working process (pool of processes). The working processes are waiting to be awakened by the coordinator, perform a job and wait again. The coordinator … | |
This is MPI parallel program running using putty software.. I've done some part but I got errors... :'( can anyone tell me what's the problems? I've done the serial part but I stuck in this parallel part....... [I attach smaller input because I'm having problems attaching the real input] I … | |
i need a answer of the above Q? | |
write a system program to create a file called myfile1 containing the letters of the alphabet followed the first one hundred integers. Write another program to open the file myfile1 and read it and print the contents on the screen/monitor (stdout). Its an assignment, please help!! | |
#include<stdio.h> #include<math.h> #include<conio.h> #include<time.h> #include<stdlib.h> #define LIMIT 100000000 //max value of n void main(){ double mypi,x,y ; int minus ; // 1 for pos., 2 for neg. long int m,n; time_t t; n = 0; m = 0; srand((unsigned) time(&t)); clrscr(); do{ n++; x = (rand()/(double)RAND_MAX); //pick a random X … | |
Hi, I can't figure out why this isn't working (it's part of a larger amount of code but I tested it separately and I still get an error): [CODE] int nrows = 5; int ncolumns = 4; int i; int **array = malloc(nrows * sizeof(int *)); for(i = 0; i … | |
| Hello All. After couple hours reading posts here and all over the web, i wasnt able to find example of code to "rewrite it" my way. All i need is: 1. read the file (txt), 2. scanf for string, 3. compare each line for this string, 4. if found printf … |
Hey guys, I am working on this square deal problem that I cant figure out. This is the problem: Input for this program will be two positive integers entered from the keyboard via scanf. The first will be an odd integer N in the range of 3 to 15. N … | |
Hello, I am trying to store data within a char in C. Different types of data will be used, for example, strings and integers. I have tried the following code: [code]char rawdata[4] = {0xfe, 0x01, 0x99, 0x42}; unsigned int *test = (unsigned int*) rawdata; printf("%u\r\n", *test);[/code] However, it returns the … | |
//================= konfigure LCD // porta za podatoci e PORTB sbit LCD_RS at RB4_bit; sbit LCD_EN at RB5_bit; sbit LCD_D4 at RB0_bit; sbit LCD_D5 at RB1_bit; sbit LCD_D6 at RB2_bit; sbit LCD_D7 at RB3_bit; sbit LCD_RS_Direction at TRISB4_bit; sbit LCD_EN_Direction at TRISB5_bit; sbit LCD_D4_Direction at TRISB0_bit; sbit LCD_D5_Direction at TRISB1_bit; sbit … | |
hejsa, I just got a little problem.. [B]i only have one public ip.. but i need to host several websites over many local ip's..[/B] so, i need to forward the incomming requsts (from the public) to one of the local ip's.. based on the domainname.. so, [B]mydomain.com > my public … | |
The code below will printf out the no. of characters as 6, even if we enter only 2... [CODE] #include<stdio.h> #include<string.h> int main() { FILE *fp; char c; fp=fopen("random","w"); while((c=getchar())!=EOF) putc(c,fp); printf("\nNo. of characters = %ld",ftell(fp)); fclose(fp); } [/CODE] | |
I have to write for the program. If someone could help me to understand the problem?? The example of the MAC message would be very useful for me program the PIC to work as a Super Router, and reading the serial port frame, forwards them to the standard, or rejected. … | |
I have to do my homework for passing the course :) The question is that; Firstly the starting point is (x1,y1) we get these values from user and we get a lot of two dimensional points from user.If a point is far away from the center point of the points, … | |
Ive made my binary tree in the following format [code=C] typedef struct node { int info; struct node *left; struct node *right; }*nodeptr; [/code] Im looking for a function that will accept the root pointer and print the tree in a graphical format. for eg. i want the output to … | |
what's wrong with this program, i will sort descending this program [CODE] #include <stdio.h> #include <stdlib.h> FILE *fp; typedef struct buku{ int no; char judul[30]; char pengarang[30]; int jumlah; }dt_buku; dt_buku sementara[50],bantu; int i,j; void tukar(void); void viewData(void); void sortData(void); int main() { viewData(); printf("\n\n"); sortData(); return 0; } void … | |
Hello Everyone! I am due with an assignment that I just can't seem to acomplish. So here's the deal: I get a file with the following structure: TyP_1 TyP_C2 TyP_C3 ORDER Nr_rec rec1_field1 rec1_field2 rec1_field3 rec2_field1 rec2_field2 rec2_field3 Typ_x can be S for string N for numeric or C for … | |
[CODE] #include<stdio.h> main() { int array[100], n, c, d, swap; printf("Enter number of elements\n"); scanf("%d", &n); printf("Enter %d integers\n", n); for ( c = 0 ; c < n ; c++ ) scanf("%d", &array[c]); for ( c = 0 ; c < ( n - 1 ) ; c++ ) … | |
Aim: I am learning pointer of C,now I want to write a function to change the value of a variable . [CODE]#include<iostream> using namespace std; void change (int * k) { if (*k==1) *k==0; else *k==0; } void main() { int a=1; cout<<a<<endl; change(&a); cout<<a; }[/CODE] I thought that n … | |
how to sorting this, i've problem to sort by *jum_nilai* from the highest until smallest void lihatData(void) { if(pertama==NULL) printf("Data tidak ada !!!"); else { printf("%3s %-20s %-12s %-5s %-7s %-7s %-5s %-5s\n","No","Nama","Jenis K","N Mtk","N B.Ind","N B.Ing","N IPA","Jumlah"); printf("--- -------------------- -------------- ------- ------- ------- ----- -----\n"); sekarang=pertama; do { printf("%3d … | |
Jan Feb Mac Apr Mei Jun 2006 2.53 2.24 1.91 1.72 1.45 1.38 2007 2.72 2.56 2.32 2.01 1.98 1.84 In my assignment, a similar table regarding rain is given like above. But, the real table contain 4 years and 12 months.The extra info given is: float rain[5][12] Create a … | |
Hello, I'm doing a project for my Compilers course and I stuck up on this. my project is little, it's a program that allows entering a mathematical equation and identifies and outputs the equations type to the user. I wrote the grammars for it and used Flex to generate a … | |
hi can someone help??? I have done my assignment but my teacher asked me to do a test plan and test log I don't know how to do it....... please help me, I need some idea how to start..... | |
I'm trying to make a binary calculator and I just can't find what's going wrong: [CODE]#include <stdio.h> void dec2bin(long decimal, char *binary); void dec2bin1(long decimal2, char *binary2); int binaryAddition(int,int); int main(void){ long int binarym1,binarym2,multiply=0; int digit,factor=1; long decimal; long decimal2; char binary[80]; char binary2[80]; printf("\n\n Please enter the first value … | |
hi all, i am trying to run a command from shell and it is running fine but if i am trying to run the same command using system function then its not working. about the command: this command is used to transfer file from one machine to another. please find … | |
hi, i want some problem so that i can write its code.my vacations are there and i m thinking to practice some codes.i have done data structures well and please gives problems on which i can think and implement them. :-)) don't give too much high level problems. | |
Hello Everyone! That's my first post on this forum and I'd like to greet Everyone I got a question about getting the last key pressed without stopping the programm. I know that getchar(), cin, getch() commands don't allow to do that. Have You any idea how to solve this problem? … | |
Actually i got the source code form official website but its looking like latin & greek !!!! So in order to understand the source code !! from where should i start ???? how can understand where to begin with and go on to end..... provided i have the knowledge of … | |
This is for an extra credit assignment for class. Requirements I am having trouble with: 1. User enters number specifying numbers of integers 2. User enters integers 3. program will read them and parse. ---------------------------------------------------------- Here is a sample input and what the program should do: How many numbers: 5 … | |
Dear all, I have a quick question about if-else-if control flow (you'd think by now these questions would be unnecessary, but here I am): If I was told to rewrite a function that looked like this (this is an exam question so I am not asking the exact question in … |
The End.