15,550 Topics

Member Avatar for
Member Avatar for vibhu mishra

i have a c code for printing all permutation of string. I have a problem in understanding ,how recursion work in for loop and how backtracking is used in this code. Another question is that how stack work in recursion under for loop. my code--> # include <stdio.h> void swap …

Member Avatar for David W
0
399
Member Avatar for begueradj

Hello I have downloaded a source code written in C. There I found a Makefile file . Can you tell me how to run that "makefile" file from command line ? thank you

Member Avatar for biswajit.jgec
0
738
Member Avatar for churchill.omorere

Design a C program to convert a decimal number to equivalent 8-bit binary number. Include code that will ensure that the input number is valid, i.e. that numbers 0 to 255 only are accepted. For example, the table below illustrates the process of converting the Decimal number 14 to equivalent …

Member Avatar for deceptikon
-1
108
Member Avatar for niyasc

hei May I know how to handle dev cpp; It shows error even for simple programs which I had successfully run in turbo c 3.0

Member Avatar for Ancient Dragon
0
333
Member Avatar for b.moattar

a program to play Rush Hour. the board is supposed to look like this: -------- |GG...Y| |P..B.Y| |PRRB.Y> |P..B..| |O...TT| |O.FFF.| -------- then You may assume the user enters either upper-case or lower-case input, with or without intervening spaces. and The program ends when the red car touches the '>' …

Member Avatar for rubberman
0
251
Member Avatar for Kevin_7

I'm having trouble compiling a short amount of code to the "Hello World" programming and am needing assistance. This is the error message that I get: no input files C:\Dev-Cpp\My World\Makefile.win [Build Error] n\make.exe: *** ["Hello] Error 1

Member Avatar for Ancient Dragon
0
218
Member Avatar for ReaseySo

#include <stdio.h> Reverse Number In C Program int main() { int n, reverse = 0; printf("Enter a number to reverse\n"); scanf("%d",&n); while (n != 0) { reverse = reverse * 10; reverse = reverse + n%10; n = n/10; } printf("Reverse of entered number is = %d\n", reverse); return 0; …

Member Avatar for jnawrocki
0
470
Member Avatar for rocky2008

clrscr() is usually given after the declaration of all variables. If it is given before the declaration(of variables), the compiler points out an error. Why is this due to ? Will there be any problem in allocating the required amount of memory if at all clrscr() is given before the …

Member Avatar for Ancient Dragon
0
917
Member Avatar for kent.johnstone_1
Member Avatar for rubberman
0
275
Member Avatar for ahmedsalem

Now after learning some C -not so perfect- I want to know how to give my program some style like a button a background image ....etc I want to turn it into a real program with colors mouse interface and other things

Member Avatar for Ancient Dragon
0
56
Member Avatar for V3N0M

Hi everyone so I have started learning strings in c and I get a problem. I have been changing initialized strings to uppercase or lower case and its easy. But I am having some trouble changing user input to uppercase. Here is a simple program which will take user input …

Member Avatar for Ancient Dragon
0
177
Member Avatar for deven (emile)
Member Avatar for bogoreh

hi dear fellow i have tried to add structure array in my program and i had a few issue to add. please can anyone tell me how can i add a structure array in the following program #include <stdio.h> #include <stdlib.h> #include<string.h> #include<conio.h> struct books{ char name[22], book[25],date1[10], date2[10],id[7],bid[7]; } …

Member Avatar for bogoreh
0
275
Member Avatar for harshchandra

This program just demonstrate how a node can be added,deleted,searched,counted,and printed using Singly Linked List. An easy code to understand :)[code]////////////////////////////////////////////////////////////// ////////// -: Singly Link list :- ///////// //////////////////////////////////////////////////////////// /* reference : Understandng pointer though c - Y karnetkar. */ ////////////////////////////////////////////////////////// ////////// Programmer : Harsh chandra /////////// //////////////////////////////////////////////////////// # include<stdio.h> …

Member Avatar for hanumant113
1
803
Member Avatar for boomboombugsh

How do I show this output using for loop statement? 1 23 345 4567 Thanks in advance :)

Member Avatar for iqra liaquat
0
223
Member Avatar for haroon.khaliq

A computer program intended to be developed which allow creating,reading,updating and deleting student data,one student data comprises of the name,roll numbers and their grades. the version of this application should use text files to store the student data,the arrays structures should be used, this is the code i am trying …

Member Avatar for rubberman
0
150
Member Avatar for V3N0M

Hi I am learning strings in c. And I stumbled on this errors on Xcode. What I am doing wrong? #include <stdio.h> #include <string.h> int main(int argc, const char * argv[]) { char *colors[3][10] = {'\0'}; printf("\nEnter 3 colors separated by spaces: "); scanf("%s %s %s", colors[0], colors[1], colors[2]); //error: …

Member Avatar for V3N0M
0
118
Member Avatar for Rahul47

Hi guys, here is my code for sizeof() problem. #include<stdio.h> struct student{ char name[30]; int roll_no; float marks; }; int main(){ struct student s; printf("\nSize of Name: %d Bytes.", sizeof(s.name)); printf("\nSize of Roll No: %d Bytes.", sizeof(s.roll_no)); printf("\nSize of Marks: %d Bytes.", sizeof(s.marks)); printf("\nSize of S Total: %d Bytes.", sizeof(s)); …

Member Avatar for ddanbe
0
208
Member Avatar for seo2005

Hi, I would like to print the table of a number entered by the user like 2 *1=2 2*2=4 2*3=6 The code is [code=c]#include<stdio.h> #include<conio.h> main() { int i,num; printf("Enter any number"); scanf("%d",&num); for(i=1;i<=num;i++) printf("%d*%d=%d",num,i,num*i); getch(); }[/code] But this code is generating errors.

Member Avatar for Nehal512
0
681
Member Avatar for V3N0M

Hi there y'all I have written a simple program that lets you roll a dice. So in one way I am passing this and in another I would like anyone capable of finding a bug, or check my code if I could have used less lines of code or Tell …

Member Avatar for ddanbe
0
153
Member Avatar for Rahul47

Hello folks, here is my code with question in it. #include<stdio.h> int main(){ float c=10.0001; char *p; p=(char *)&c; // Casting is correctly done. What exactly is purpose of (char *) ? printf("%f", *p); getch(); return 0; } OUTPUT: ![7d924474e7b33ad0974a971ebce23576](/attachments/small/4/7d924474e7b33ad0974a971ebce23576.jpg "align-right")

Member Avatar for ddanbe
0
166
Member Avatar for Rahul47

Hi guys, here is my code that am working on this morning, and I came across a point when pointer operation went wrong. #include<stdio.h> int main(){ char a[20]="Hello World !!!"; char *ptr=a; FILE *p; p=fopen("new.txt", "w"); int i; for (i=0; *ptr != '\0'; i++){ fprintf(p,"%c", ptr[i]); } fclose(p); getch(); return …

Member Avatar for Rahul47
0
185
Member Avatar for Dri Tan

#include <stdio.h> #include <stdlib.h> #include <stdio.h> #inculde <stdlib.h> typedef struct elementi{ int data; typedef struct *next; }lista; lista*putel(lista *l,int x){ lista*tmp; tmp=new elementi; //How can i put a new element? tmp->data=x; tmp->next=l; tmp=l; } . . . (continue)

Member Avatar for Ancient Dragon
0
54
Member Avatar for Iurie

HI ALL, I am trying to sketch the beging of function and the end, #include<ctype.h> #include<graphics.h> #include<conio.h> #include<math.h> #include<dos.h> #include<stdio.h> #include<stdlib.h> int xmax =1024;// getmaxx(); int ymax =760;// getmaxy(); float r,h;//??? int i; void grafica(){ //int gd=DETECT, gm; //initgraph(&gd, &gm, "..\bgi" ); initwindow(xmax,ymax, " Miscare "); setcolor(15); } float f(float …

Member Avatar for Iurie
0
220
Member Avatar for V3N0M

Hi everyone I would like to ask if the code below can me modified to a 3x3 array if not I am ok with that too. The variable is board[3][3]; #include <stdio.h> #include <stdlib.h> /************************************ function prototype ***********************************/ void displayBoard(); int verifySelection(int, int); void checkForWin(); /************************ gloobal variables ***********************/ char …

Member Avatar for Suzie999
0
149
Member Avatar for himanshusharma

I wrote a simple prog. for drawing a circle . Compiled it .. n THERE WAS NO ERROR. But at the Execution time Error Occured : BGI ERROR: Graphics not intialized use 'initgraph I used initgraph olready . [B]1.[/B]Then i copied EVAVGA.BGI from BGI to BIN.. i tried again .. …

Member Avatar for RAHULtripathi86
0
332
Member Avatar for symon_1

I have text file in D drive named "data.txt". It have several columns and rows like A B A B V B B V A B A A B B A A B A I want to read it and then convert it to say A=1, B=2, V=3 and then …

Member Avatar for Rahul47
0
237
Member Avatar for willyah

How do i write a program in C to do split and merge operation. I have configured my system with opencv.

Member Avatar for Suzie999
0
2K
Member Avatar for willyah

Am a beginner in C programme. How do I define two vectors of complex numbers with random valuee of size N. appling this code complex*vector=(complex*) malloc(sizeof(complex)*N)

Member Avatar for rubberman
0
158
Member Avatar for willyah

How can write a paralle program using the openmp threading library(omp.h) to calculate the time needed to calculate the dot product of two vectors.

Member Avatar for Ancient Dragon
0
184

The End.