Q. An automatic password creator program creates a password from the name. Collects initials of the name and separates each character by “.”. Write a code which will help it to create a password.
Example:
Entered name: Ketan Hasmukh Shah
Your Temporary Password is: K.H.S
Please kindly send your solution to our G-mail account: codeseekers@gmail.com
And please specify your Name, Branch, IDE Name or Language Name and your own pic.
1. Change the background color of the output screen in Turbo C.
2. C Program to Shutdown the PC.
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch;
printf("Do you want to shutdown your computer now (y/n)\n");
scanf("%c", &ch);
if (ch == 'y' || ch == 'Y')
system("C:\\WINDOWS\\System32\\shutdown -s");
return 0;
}
For
#include <stdio.h>
#include <stdlib.h>
int main()
{
system("C:\\WINDOWS\\System32\\shutdown /s");
return 0;
}
For
#include <stdio.h>
int main() {
system("shutdown -P now");
return 0;
}
The best way to make a code universally applicable on every language is to make a ALGORITHM of the code or you can also make a FLOW CHART or PSEUDO CODE.
Algorithm is a self-contained step-by-step set of operations to be performed.
Learn more about Algorithm visit the link given below
Or you can also visit Wikipedia.
Learn Basics of C visit the link given below
If your still not a member of this club then register here now for free membership:
Solutions for Question of this week:
Solution by Samir Gandhi:
Solution by Vraj Patel:
Solution by Bhoomi Pansuriya:
No comments:
Post a Comment