How Many of You Remember This Screen?

in #programming6 years ago

Image Source

C is the first programming languages learned in most schools and colleges. But we can definitely say that there are lots of different funny tricks or hidden things that not everyone knows.

Trick 1: Log Off Computer Using C

#include <windows.h>

int main(){

   system("shutdown -l -f -t 00");

}

Trick 2: Smart Random Number Generator

#include <time.h>

srand(time(NULL));

Trick 3: Cool SCANF Tricks

scanf(“%[^,],”,a); // This one scraps comma

scanf(“%[^,]”, a); // This doesn’t scrap comma

scanf(“%[^\n]\n”, a); // read until meet ‘\n’, then trashes the ‘\n’

If you like this post then please upvote and you are most welcome to ask questions which we’ll be more than happy to answer.

Sort:  

You got a 27.27% upvote from @proffit courtesy of @bordadigvij!
2-25% Return on investment. Check steembottracker.com for current status
Minimum 0.01 SBD/STEEM to get upvote , Minimum 1 SBD/STEEM to get upvote + resteem

You got a 55.56% upvote from @joeparys! Thank you for your support of our services. To continue your support, please follow and delegate Steem power to @joeparys for daily steem and steem dollar payouts!

This post has received a 5.39 % upvote from @boomerang.

This post has received a $66.67 % upvote from @siditech thanks to: @bordadigvij.
Here's a banana! banana-small.png

You got a 48.36% upvote from @moneymatchgaming courtesy of @bordadigvij! Please consider upvoting this post to help support the MMG Competitive Gaming Community.

You got a 20.00% upvote from @nado.bot courtesy of @bordadigvij!

Send at least 0.1 SBD to participate in bid and get upvote of 0%-100% with full voting power.

You've received a lifting from @botox ! Consider delegating to earn passive income 20SP,50SP,100SP,200SP.
Tu viens de recevoir un lifting de @botox ! Envisager de déléguer pour gagner un revenu passif 20SP,50SP,100SP,200SP.

Thank you so much for using our service! You were protected from up to 20% losses!

Help us grow by delegating to us! 100sp, 500SP, 1000SP, ANY SP

You just received 10.05% upvote from @onlyprofitbot courtesy of @bordadigvij!

Loading...

sneaky-ninja-sword-xs.jpg
Sneaky Ninja Attack! You have just been defended with a 3.15% upvote!
I was summoned by @bordadigvij. I have done their bidding and now I will vanish...

woosh
A portion of the proceeds from your bid was used in support of youarehope and tarc.

Abuse Policy
Rules
How to use Sneaky Ninja
How it works
Victim of grumpycat?

Coin Marketplace

STEEM 0.20
TRX 0.19
JST 0.034
BTC 90741.27
ETH 3105.77
USDT 1.00
SBD 2.95