15,550 Topics

Member Avatar for
Member Avatar for beanryu

Hi, I want to create multiple executables corresponding to their .c files in one target rule. For example, I have prog1.c and pro2.c, how do I create the executables prog1 and prog2 from just one target? By target I mean something like this test: [I]dependencies[/I] [tab] [I]command rules[/I] Thanks in …

Member Avatar for er_mv
0
228
Member Avatar for Odc

Hi guys, I've got a simple bool 2D array that is set to false by default. I'm filling it with random 'true' values. I am then trying to make it symmetrical i.e. array[i][j] = array[j][i] However, this doesnt seem to be working and I was wondering why. I've been trying …

Member Avatar for twomers
0
93
Member Avatar for riu

hi every body i want array concept in programming why we use arrays in codes and etc

Member Avatar for mrnutty
0
50
Member Avatar for speedy94519

Hello you guys, Would anyone like to give me suggestions on how to make a code for the following pattern? Please note that the numbers arent part of the pattern, they are just a guide for row and column. * * * * * # # # 1 * * …

Member Avatar for mrnutty
0
95
Member Avatar for yugatpt

hai friends this is yugandhar, i want to learn c language so i want install c setup, wile iam installing the setup file is not installing proprally but right now iam using vista operating system can u help me any one, if u have any c language setup file send …

Member Avatar for Ancient Dragon
0
104
Member Avatar for kirit275

You can insert a no. at any pt. in this program. here is the code: #include<stdio.h> #include<conio.h> #include<process.h> #include"goto.c" void line(void); void cross(void); int main() { clrscr(); int a[9][9]={8,6,7,5,4,2,3,9,1, 4,3,2,9,1,8,5,7,6, 9,5,1,7,6,3,4,2,8, 5,2,9,6,8,4,7,1,3, 7,4,8,3,5,1,2,6,9, 6,1,3,2,7,9,8,5,4, 1,8,5,4,2,6,9,3,7, 2,9,6,8,3,7,1,4,5, 3,7,4,1,9,5,6,8,2}, b[9][9]= {8,6,' ',' ',' ',' ',' ',9,' ', 4,' ',2,' ',1,' ',5,' ',' …

Member Avatar for jephthah
0
146
Member Avatar for forislam14

i have an assignment which let the user writes into the terminal -linux system- any command and i should take this command he wrote to execute it using fork and execvp() i already can fork a child .. but cant pass parameters to execvp cuz i can't understand what these …

Member Avatar for Ancient Dragon
0
94
Member Avatar for aalice

/* A Program testing for rational number*/ #include <stdio.h> #include <stdlib.h> typedef struct rational_t { int numer; int denom; } rational_t; int gcd(int a, int b) { /* To reduce the rational number to its lowest form. */ if(b==0) return a; else return gcd(b,a%b); } /* r_init: Creates rational number …

Member Avatar for Tom Gunn
0
156
Member Avatar for seo2005

I want to write a C program to test whether the character is uppercase, lowercase, digit or special symbol. [code=c] void main () { char ch; printf("\n Enter any character from the keyborad"); scanf("%c",&ch); if (ch>=65&&ch<=90) printf(" \n the character is uppercase); if(ch>=91&&ch>=122) printf(" \n the character is lowercase); if(ch>=48&&ch<=57) …

Member Avatar for Tom Gunn
0
282
Member Avatar for aalice

In this assignment you to implement a short C program that works with factorization of integers. You will write a C program that computes and prints out the sum of all natural numbers below 100,000 that are multiples of 3,5 or 7. In Detail If you are asked to sum …

Member Avatar for BestJewSinceJC
0
90
Member Avatar for KEYURI PATEL

Hi, i'm keyuri from g'nagar. I want help for solving my 'c' programming exercises from book

Member Avatar for alisattar
0
32
Member Avatar for theprofoundgeek

Hi, I am writing a C code to add two matrices. I want to take input with a feel of real martice, some thing like 1 2 3 4 5 6 7 8 9 but the Scanf function automatically enter EOL and hence my input looks some thing like this, …

Member Avatar for Gaiety
0
150
Member Avatar for kapiljain469
Member Avatar for seo2005

Hi, I don't understand the if statement here. Can anyone explain how the execution of if loop will proceed. Why are we using || and && operators here. #include<stdio.h> void main { int year; printf("Enter the year: "); scanf("%d",&year); if(year%400 ==0 || (year%100 != 0 && year%4 == 0)) { …

Member Avatar for SecurExpert
0
212
Member Avatar for onemanclapping

Hi, I'm an IT Engineering student and I have the task of doing, in C, a function that does on linux the equivalent of the 'locate' function. Can someone help me? I need ideas for how to read a file system! How can I list directories (to a string or …

0
113
Member Avatar for speedy94519

Hello you guys, Would anyone like to give me suggestions on how to make a code for the following pattern? * * * * * # # # 1 * * * * # # # # [B] ROW [/B] 2 * * * # # # # # 3 …

0
52
Member Avatar for Odc

Hi there, I am trying to read integers from a file and store them into an array but I have no idea how to do it. The file is a text document whos contents are arranged like an adjacency list. Here is an example file: 0 : 2,4,5,6,10 1 : …

Member Avatar for Odc
0
113
Member Avatar for OSiRiSsk

Hi, im creating some program, which reads number from stdin, and save them into variable X, but how can i make condition that program will print error on the screen if X is not number [CODE=c] #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main() { float x; while ( (scanf("%e",&x)) …

Member Avatar for Aia
0
259
Member Avatar for parth malhotra

as a bigginer in c , having problem in understanding basics that how to develop programs with use of functions

Member Avatar for surbhi bhasker
0
48
Member Avatar for luoyangke

who can tell me what the use of "\n" is? and what the difference between [CODE]scanf("%d",&j); [/CODE]and [CODE]scanf("%d\n",&j)[/CODE];?

Member Avatar for Dave Sinkula
0
108
Member Avatar for cjjack88

Hi, I am trying to read the following information from a text file and save it a binary search tree. The data are: [CODE] Toyota 1.3 Solid 33,235.04 3300.00 Nissan1.3 Solid 38,235.04 3300.00 [/CODE] [CODE]struct Node { char model[50]; char colourType[20]; double price; double deposit; struct Node *parent; struct Node …

Member Avatar for cjjack88
0
86
Member Avatar for its.avinash

Hi all! Please somebody explain me how this snippet is working!! [CODE]main() { float a 4.379; char*p; int i; p=(char*)&a; for(i=1;i<=3;i++) printf("%02X",(unsigned char)p[i]); } [/CODE]

Member Avatar for Gaiety
0
136
Member Avatar for kiran islam
Member Avatar for sathish.b

good morning to every one....... How to use the %n in scanf () & printf()? ..explain in thoroughly with examples... thanking you for giving answer

Member Avatar for kvprajapati
0
84
Member Avatar for thebluestar

[CODE=C] #include<stdio.h> #include<conio.h> #include<string.h> int main() { //int a[10]={2,5,1,7,0,10,145,14,15,9}; int a[10]={1,2,3,4,5,6,7,8,9,10}; int tem,i=0,j,isTRUE=0; for(j=0; j<10; j++) { if(a[j]<a[j+1]) { isTRUE=1; break; } isTRUE=0; } if(isTRUE) printf("inorder\n"); else printf("ASEorder\n"); getch(); return 0; } [/CODE] Here's my source code about checking an array is ordered or not But it didn't work properly, …

Member Avatar for kvprajapati
0
6K
Member Avatar for eghtedari.amir

I want to know is there a complete divide function in C standard library that retrieves the quotient as a float number. in fact I want the remainder to be zero or be as next to zero as possible. Is there such a function? Thanks,

Member Avatar for Ancient Dragon
0
51
Member Avatar for rmcummings

I am new to C++ and am writing a program that will call other functions. I keep getting an error for a undeclared identifier for "vowel" in this section of code. Can anyone help? #include <iostream> #include <iomanip> using namespace std; void generate_random_vowel(char &vowel); int main () { char vowel; …

Member Avatar for rmcummings
0
185
Member Avatar for jodie121997

Hi all, I have the static variable g_listItem which is the header of the link list. I have created the generic API which will be used by other module and every time this API(add_info_node()) is invoked I want to want the node to this single link list which I declare …

Member Avatar for Gaiety
0
129
Member Avatar for ankur_

what is the time that select func in socket programming waits before continuing. Like till how much time it can receive msg from diffrent clients before proceeding to serve the request. One more question. Can we send 500 messages from 500 diffrent clients at the same time to a server …

Member Avatar for kvprajapati
0
101
Member Avatar for yasaswyg

I need help writing a program that randomly picks a point in a 2D space. Then the user will be allowed to make repeated guesses which point was picked with feedback saying if the user is hot or colder on each guess. Thank you!

Member Avatar for yasaswyg
0
88

The End.