Easiest Answer to your problem is to create new directory in your application root like this:
-Your_Application
-application
-assets <-- Create this folder.
-css <-- Create this subfolder inside assets folder.
-js <-- Create this subfolder inside assets folder.
-script.js <-- Place your script files inside js folder.
-system
-index.php
Now you are able to access your css and js files using url helper like this:
<script src="<?php echo base_url('/assets/js/script.js'); ?>" ></script>
Follow same procedure for css and make sure url helper is enabled from config/autoload.php like this:
$autoload['helper'] = array('url');
Want to know the reason behind this:
The reason behind happening this is that your application outputs from index.php in your application root as CI implemented Front-controller design pattern.
So we don't need to place our public assets anywhere inside our application that's why CI restrict direct access to application and system folder from the public access.