diff options
Diffstat (limited to 'Let_us_C/chapter-15.ipynb')
-rw-r--r-- | Let_us_C/chapter-15.ipynb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Let_us_C/chapter-15.ipynb b/Let_us_C/chapter-15.ipynb index bf1ab52b..993f6a9b 100644 --- a/Let_us_C/chapter-15.ipynb +++ b/Let_us_C/chapter-15.ipynb @@ -25,7 +25,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to print a payroll using enum'''\n",
"\n",
"def enum(**enums):\n",
" return type('Enum', (), enums)\n",
@@ -82,7 +81,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to achieve the task of enums using macros'''\n",
"\n",
"#macro definition\n",
"ASSEMBLY = 0\n",
@@ -114,7 +112,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate no typecasting'''\n",
"\n",
"#Variable declaration\n",
"x=6\n",
@@ -150,7 +147,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate explicit typecasting'''\n",
"\n",
"#Variable declaration\n",
"x=6\n",
@@ -186,7 +182,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate typecasting'''\n",
"\n",
"#Variable declaration\n",
"a=6.35\n",
@@ -220,7 +215,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate bit fields in structures'''\n",
"\n",
"from ctypes import *\n",
"import ctypes\n",
@@ -276,7 +270,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate pointers to functions'''\n",
"\n",
"#Function definition\n",
"def display():\n",
@@ -311,7 +304,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to invoke a function using a pointer to a function'''\n",
"\n",
"#Function definition\n",
"def display():\n",
@@ -346,7 +338,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate functions returning pointers'''\n",
"\n",
"#Function definition\n",
"def fun():\n",
@@ -372,8 +363,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program which copies one string into another and\n",
- "returns the pointer to the target string'''\n",
"\n",
"#Function definition\n",
"def copy(t,s):\n",
@@ -415,9 +404,7 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate a findmax() function\n",
"to find out max value from a set of values\n",
- "irrespective of number of values passed to it'''\n",
"\n",
"#function declaration\n",
"def findmax(*arg):\n",
@@ -459,8 +446,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate a display() function\n",
- "to print any number of arguments of any type'''\n",
"\n",
"#function declaration\n",
"def display(*arg):\n",
@@ -514,7 +499,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to demonstrate a union at work'''\n",
"\n",
"from ctypes import *\n",
"\n",
@@ -544,8 +528,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to demonstrate that we cant assign different values to\n",
- "different union element at the same time'''\n",
"\n",
"from ctypes import *\n",
"\n",
@@ -580,7 +562,6 @@ "cell_type": "code",
"collapsed": false,
"input": [
- "'''Program to illustrate structures nested in a union'''\n",
"\n",
"from ctypes import *\n",
"\n",
|