- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 5
- Posts with Downvotes
- 3
- Downvoting Members
- 4
17 Posted Topics
I have done my final year project about Wireless Electronic Notice Board using Microcontroller and GSM: This wireless electronic notice board using GSM Technology and microcontroller circuit is used to display the data on LCD whatever we sent from the mobile. You can try that.
Just try out this code. Hope it may be useful for you. #include<stdio.h> #include<conio.h> void main() { int w=0,i=0,j=0,l,a[10],big; char ch[25],st[10][20]; clrscr(); printf("Enter the string:"); gets(ch); while(ch[i]!='\0') { if(ch[i]==' ') { st[w][j]='\0'; a[w]=j; j=0; w++; } else { st[w][j]=ch[i]; i++; } i++; } big=l=0; for(i=0;i<w;i++) { if(big<a[i]) { big=a[i]; l=i; …
Please check out the code below. If there any mistake, please point out. #include <iostream> #include <stack> #include <queue> #include <string> using namespace std; bool operator==(const stack<char>&, const queue<char>&); bool operator!=(const stack<char>&, const queue<char>&); int main(int argc, char *argv[]) { stack<char> *s; queue<char> *q; string input; string::iterator i; while (true) …
I agree to Mike. I don't think there would not be any difference in the memory allocation unless you go for dynamic memory allocation.
You can make out the different of structure and union by going through the following points. Structure : 1.The keyword struct is used to define a structure 2. When a variable is associated with a structure, the compiler allocates the memory for each member. The size of structure is greater …
Try out the following code: #include<iostream.h> int main(void) { int arr[4]={23,38, 81,12}; int biggest = a[0]; for(i=1; i < 4; i++) { if(arr[i]>biggest) biggest = arr[i]; } cout << "largest integer is" << dec << biggest << endl; }
I have done a program to convert binary to decimal. You can add the code to sort the number in the given code. #include<iostream.h> #include<conio.h> #include<math.h> void main() { int a[10],i,no,sum=0,rem,j,k=0; clrscr(); cout<<"Enter Binary No:"; cin>>no; i=0; while(no>0) { a[i]=no%10; no=no/10; i++; } for(j=0;j<i;j++) { sum=sum+a[j]*pow(2,k); k++; } cout<<"Decimal NO:"<<sum; …
Try out the following code: #include<iostream.h> #include<conio.h> void main() { //clear the screen. clrscr(); //declare variable type int int a[10],i,j,temp; //Input the two numbers save them in arrays. for(i=0;i<5;i++) { cout<<"Enter the no :"; cin>>a[i]; } //sort the array for(i=0;i<5;i++) { for(j=0;j<5;j++) { if(a[i]<a[j]) { temp = a[i]; a[i] = …
I think it would be better to disucuss a simple program for the better understanding. You can find the details here: https://fiftyexamples.readthedocs.org/en/latest/algorithms.html#an-example-algorithm
You just post the code which you have tried so that we can modify that code to give the correct output.
Multithreading is a specialized form of multitasking and a multitasking is the feature that allows your computer to run two or more programs concurrently. In general, there are two types of multitasking: process-based and thread-based. Process-based multitasking handles the concurrent execution of programs. Thread-based multitasking deals with the concurrent execution …
The program seems as correct. I cannot spot what went wrong. But try again after including the library function #include<conio.h> as well.
I am very happy to be a part of this forum. Hope it is great platform for those who are interested in developing and other related fields.
Hope the following sample code would be helpful for you to get an idea about switch statement. Then you can modify the code as per your program. #include <stdio.h> void playgame() { printf( "Play game called" ); } void loadgame() { printf( "Load game called" ); } void playmultiplayer() { …
You just try this code snippet. It is simple. FILE *fp; fp=fopen("c:\\test.txt", "wb"); if(fp == null) return; char x[10]="ABCDEFGHIJ"; fwrite(x, sizeof(x[0]), sizeof(x)/sizeof(x[0]), fp); fclose(fp); Or else you can done it in the following way as well to write a sentence in the file. #include <stdio.h> #include <stdlib.h> /* For exit() …
Pointers was a bit complicated topic for me. But here I could grasp the coding easily. I have excuted the program, also I have tried out the code argv[i] = strdup(temp); by replacing strcpy() line. Now the pointers is becoming interesting for me.
If you are going through the sample program, you can understand how to call a function depending upon the type of parameter passed and value returned. in the program you can see the function call c = sum(a,b); #include<stdio.h> #include<conio.h> int sum(int,int); void main() { int a,b,c; printf("\nEnter the two …
The End.
dinad578