码迷,mamicode.com
首页 > 其他好文 > 详细

c assert 用法

时间:2018-10-20 22:43:47      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:print   pre   stdio.h   sse   div   number   std   bsp   oid   

 

#include <stdio.h>      /* printf */
#include <assert.h>     /* assert */

void print_number(int* myInt) {
  assert (myInt!=NULL);
  printf ("%d\n",*myInt);
}

int main ()
{
  int a=10;
  int * b = NULL;
  int * c = NULL;

  b=&a;

  print_number (b);
  print_number (c);

  return 0;
}

 

c assert 用法

标签:print   pre   stdio.h   sse   div   number   std   bsp   oid   

原文地址:https://www.cnblogs.com/sea-stream/p/9823257.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!