15,551 Topics
| |
HI I donot understand where to start . I need ideas and help. void InsertList(c4735list *destinationList,c4735list *sourceList,node *startNode) { //=====================not implementd yet } this fn inserts source list into destination list.the nodes are inserted after the startnode in destination list.source list should be an empty list after this operation. the … | |
Hello everybody , i have a pending assignment and it is based on developing a Binary Search tree in C. One function which is required is Given As:- e. A function to convert the tree to a min-heap or a max-heap. Im really stuck guys , i dont have any … | |
I am curious to know how I can make my own library and use it for my C/C++ programs? I mean I want to make a library say "maths_example" which will have 2-3 files having some basic functions of maths. Then, I want to use that library for my programs … | |
#include <stdio.h> int main() { int x = 10, y = 5; // Code to swap 'x' and 'y' y=x+y-(x=y); printf("After Swapping: x = %d, y = %d", x, y); return 0; } | |
#include<stdio.h> #include<stdio.h> #include<conio.h> #include<math.h> void mergeSort(int arr[],int low,int mid,int high); void partition(int arr[],int low,int high); int decimal_binary(int); int main() { int count=0,k,d[10],c[10],b[10][10],a[10],i,sum=0,n,no,j; printf("Enter the number of binary numbers"); scanf("%d",&no); printf("Enter the binary number"); for(i=0;i<no;i++) scanf("%d",&a[i]); for(i=0;i<no;i++) { n=a[i]; for(j=0;j<4;j++) { b[i][j]=n%10; n=n/10; } } for(i=0;i<no;i++) { for(j=0;j<4;j++) { if(b[i][j]==1) sum=sum+pow(2,j); … | |
This question refers to the automatic storage class and its scope is defined as local to the block in which the variable is defined and is alive until the control is present in that block where it is defined. Consider these two snippets ... main( ) { auto int i … | |
I know this works as expected if your command line arguments are strings. #include <stdio.h> int main( int argc, char *argv[] ) { printf("Program name %sn", argv[0]); if( argc == 2 ) { printf("The argument supplied is %sn", argv[1]); } else if( argc > 2 ) { printf("Too many arguments … | |
Hello, How woud I convert String to Integer using arguments from command line? I am stuck, and no idea where to start. Thanks. | |
Hello all! I am having difficulty understanding why the range of signed integers is from -128 to +127? Assuming the size of the register is 8 bits and the leftmost bit is reserved for sign shouldn't the size be -127 to +127. I figured that for the negative values the … | |
My coding shows error when built and run. The error shows multiple definition of 'main'. Can someone help me what I did wrong here? #include <stdio.h> int main() { FILE *fPtr; int c; fPtr=fopen("C:\\Question1.txt","r"); c = getc(fPtr); while (c!=EOF) { putchar(c); c=getc(fPtr); } fclose(fPtr); return 0; } | |
Okay, i've done atleast 4 programs. The problem is, how do i combine them using switch? TBH, switch is kinda confusing... Here's the kind of output i want: press [1] for program1 press [2] for program2 press [3] for program3 press [4] for program4 *Program Here* Do you want to … | |
this is my code : #include <stdio.h> #include <stdlib.h> int main(){ FILE *fp; int i,n; char task[ 30] ; char filename[ 30]="c:\\out.c"; fp =fopen(filename,"w"); if(fp != NULL){ printf("Enter number of tasks for today!\n"); scanf("%d", &n); for(i=0;i<n;++i){ printf( "Enter tasks for today!\n"); scanf("%s",task); fprintf(fp,"%s\n",task); } fclose(fp); printf("\nDone!"); }else{ printf("couldn't open the … | |
Hello! Recently I've been working on a project which requires an API, the user supplies a function pointer which returns a specific value, this function needs a list of string arguments, similar to what you may find in the "main" function. I first thought maybe some sort of linked list … | |
any tutorial for insert data in mysql with c language | |
What should i study to master data structure? do you any sugestions? im a newbie programmer. | |
Hey guys, Im implementing a binary tree in C and i add values one by one into the Binary Tree , Once i select the Function to display the minimum and Maximum values the Program Crashes , Please help me fix this , greatly appreciated. Thanks . this is my … | |
hi guys is it posible to generate numbers using array and link list in data structure? example generating number 1 to 5000, can you give me some examples? | |
#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> typedef struct Stack { char info; struct Stack *next; }Stack; Stack *start=NULL; Stack *cstart=NULL;//variable for copy of stack Stack *rstart=NULL;//variable for reverse of stack Stack* push(Stack *, char); char pop(Stack *); int main() { char c; int flag=0; printf("Enter characters :"); c=getchar(); while( c !='\n' … | |
i'm trying building a BITMAP from memory, but isn't easy :( //create the button HandleButton=CreateWindowEx (0,"button", "hello\t\tHI", WS_CHILD | WS_VISIBLE | BS_TEXT | BS_BOTTOM |BS_BITMAP, 100, 100,500, 200,hwnd, (HMENU)4000,hInstance, 0) ; //create a dc and bitmap in memory HDC memoryDC =CreateCompatibleDC(GetDC(hwnd)); HBITMAP bitmap=CreateCompatibleBitmap(GetDC(hwnd),500,200); SelectObject(memoryDC, bitmap); //get the icon HandleIcon=(HICON)LoadImage(hInstance,"C:\\acrobat.ico",IMAGE_ICON,SM_CXICON,SM_CYICON,LR_LOADFROMFILE | … | |
I copied the following from a back but I'm getting the erros that you see at the bottom of the page. #include <SDL/SDL.h> #include <stdio.h> #include <stdlib.h> int main() { int main() SDL_Surface *screen; if(SDL_Init(SDL_INIT_VIDEO) != 0) { printf("Unable to initialize SDL: %s\n", SDL_GetError()); return 1; } atexit(SDL_Quit); screen = … | |
I'm trying to increase the limit up to a billion (or up to a hundred thousand). I don't know how. main() { long int a,b,c,d=0,e=1; clrscr(); printf(“Enter a Decimal Value: “); scanf(“%ld”, &a); while (a!=0) { b=a/2; /*Formula for Decimal c=a%2; to Binary*/ a=b; d=d+(c*e); e=e*10; } printf(“The Binary Value … | |
Ok so now i have been able to write the code for adding and subtracting two complex numbers in rectangular form but now need to do the same for multiplication and division in polar form. #include<stdio.h> #include<stdlib.h> struct complex { int real,imag; }; int main() { struct complex x, y, … | |
Here the switch() isn't working properly;not executing the function; & morever the while loop run twice when an invalid choice is given.. #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define MAX 100 int vowel_count(char*); int conso_count(char*); void to_lower(char*); void to_upper(char*); void menu(); int main() { int cnt=0; char data[MAX]=" "; bool flag=false; printf("Enter … | |
Friends, I want to know how to write a C program to embed text or data into the image, and also how to display this image as output. Can anyone please help me, its urgent guys!!! | |
I'm reading a book on C and it's telling me how to use gcc and about the -c option/flag. It reads "-c Compiles to an object (.o) file instead of an executable. This is important for creating library files." What is an object file and how is this good for … | |
Hi All, Can you please let me know what these two functions do ? I would want to know for what purpose they are being used? Kindly help Harish //CallBack function for EnumChildWindows API call from SetOS2CursorForWindows BOOL CALLBACK EnumESLChildWindowsCallback(HWND hWnd,LPARAM lParam) { //CGI_CONV_OS2WIN_START //Function body modified according to keep … | |
I am writing simple server client programs using socket, in which a client would request a video file and the server should send it that file. After recieving the file the client would play that video file. I know how to open ordinary text files and binary files but can … | |
i need help for my school project in it. the function of the program is like a calculator that computes mean, median, mode, range, percentile, & standard deviation. and i dont know how to compute for mode, standard deviation and percentile. please they gave us dev c++ for out it … |
The End.