Code has been added to clipboard!

Reference Types Allocating Memory Arrays

Example
pragma solidity ^0.4.0;

contract cont {
    function func(uint len) {
        uint[] memory x = new uint[](7);
        bytes memory y = new bytes(len);
        // Here we have x.length == 7 and y.length == len
        x[6] = 8;
    }
}