summaryrefslogtreecommitdiff
path: root/Fundamental_of_Computing_and_Programming_in_C/Chapter20.ipynb
blob: adaadc6f35c4b122ab6389f92971a61736a79294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
 "metadata": {
  "name": "",
  "signature": "sha256:7f2d14f2c2ae43d8abc01634eb7d39800f8596aa61628d10404d3502e1e30c64"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 20 : Dynamic Memory Allocation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example: 1, Page No. 5.146"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Reallocation of memory\n",
      "\n",
      "p= \"MADRAS\"\n",
      "\n",
      "print \"Memory contains: %s\\n\"%(p)            #There is no reallocation memory in python\n",
      "\n",
      "p=\"CHENNAI\"\n",
      "\n",
      "print \"Memory now contains: %s\\n\"%(p)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Memory contains: MADRAS\n",
        "\n",
        "Memory now contains: CHENNAI\n",
        "\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}