Skip to main content

Monkianer

  • 關於我
  • 中文 (台灣)

分類: C

C 語言 sscanf()

2019-03-202019-08-15 Monkianer

http://www.cplusplus.com/reference/cstdio/sscanf/?kw=sscanf

/* sscanf example */
#include <stdio.h>

int main ()
{
  char sentence []="Rudolph is 12 years old";
  char str [20];
  int i;

  sscanf (sentence,"%s %*s %d",str,&i);
  這裡表示 Rudolph is 12 = %s %*s %d
  %*s 代表忽略,如果是 %*d 代表忽略的為數字
  printf ("%s -> %d\n",str,i);
  
  return 0;
}

輸出 Rudolph -> 12

分類

  • AfterEffect
  • Apache
  • Arduino
  • AWS
  • C
  • createjs
  • CSS
  • Facebook
  • Github
  • Google
  • Grunt
  • GTM
  • Home
  • JavaScript
  • Mobile
  • NAS
  • Node
  • npm
  • Photoshop
  • PIXI
  • Playground
  • Sass
  • SVG
  • Vue
  • Wordpress
  • 未分類
  • 軟體工具

Links

  • ESP32 I/O
  • Mr Digital (很棒的 WP 教學)
  • Wordpress Full Site Editing Tutorial
  • You Don't Need jQuery!
  • SitePoint
  • 30 Seconds of CSS
  • unbox
  • PJCHENder
  • The Tools of an HTML Email Workflow
  • BEM
  • Yoichi Kobayashi
  • http://turtle.audio/
  • JOJO
  • rachelandrew.co.uk
  • Uplabs
  • A.I. Experiments
  • Workshop . ChromeExperiments
sparkling Theme by Colorlib Powered by WordPress