15,552 Topics
| |
Hello, Hope this is the right place to post, I am a student and want to create an OS like DOS just for practice, I know functions, arrays, pinters, structures and file handling but dont know how to start writing an OS, please help me. Regards. | |
Having trouble understanding pointers . Could anyone please help me out ? thanx in advance. | |
I am trying to create Menu Selection process.if SELECT button pressed once should display the Display parameter and if select button pressed twice should goes to Set_parameter window(Where we set parameter). once it is display parameter using up and down arrow Choose the Display window .But problem i am facing … | |
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 … | |
| 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 |
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 … | |
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 | |
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 '>' … | |
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 | |
#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; … | |
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 … | |
in the code const char* buf what is the constant? The pointer or buf? | |
| 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 |
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 … | |
i wanted to know programing structure for prime and composit to n num | |
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]; } … | |
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> … | |
How do I show this output using for loop statement? 1 23 345 4567 Thanks in advance :) | |
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 … | |
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: … | |
| 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)); … |
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. | |
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 … | |
| 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") |
| 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 … |
#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) | |
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 … | |
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 … | |
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 .. … | |
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 … |
The End.