Posts

Notes on c/c++

  In modern systems, size of all pointer types on a given platform is same i.e. whether it is ‘pointer to char’ or ‘pointer to int’ or ‘pointer to pointer to int’ etc., the size of all these pointers is same. In C, an identifier (e.g. variable) can consists of letters, digits and underscores only. But it can’t start with a digit e.g. 9var is invalid. Unlike ‘long long int’, there’s nothing like ‘long long double’ in C. Besides, real data types (i.e.  float ,  double ,  long double ) can’t be  unsigned . In C, ‘ printf(“%d”,090); ‘ is invalid because an octal constant consists of the prefix 0 optionally followed by a sequence of the digits 0 through 7 only. Real constants (e.g. 1.414) has data type as  double . To convert them to  float , we need to suffix them with f or F (e.g. 1.414f or 1.414F).   Modulus operator (%d) isn’t defined for real types however library functions  fmod(), fmodf(), fmodl()  from math.h can be used for  double ,  float  and  long double  respectively. In C, an

Short Notes Of computer Network

Image
  OSI Layers,data units and Functions: Layers Data Units Functions Application Layer Data Mail Services,Directory Serices,FTAM Presentation Layer Data Encryption/Decryption, Compression Session Layer Data Session Establishment, Synchronization,Dialog Controller Transport Layer Segments,Datagram Segementation Network Layer Packets Traffic control,Fragmentation,Routing Data Link Layer Frames Flow control,Error control,Access control Physical Layer Bits Bit Synchronization,Bit rate control,Physical Topologies Layers and their uses – Physical Layer Network Topologies: Mesh Topology: In mesh topology, every device is connected to another device via particular channel.If suppose, N number of devices are connected with each other, then total number of links required to connect NC 2 . Bus Topology: Bus topology is a network type in which every computer and network device is connected to single cable. If N devices are connected, then the number of cables required 1 which is known as backbone ca

Short Notes On Operating System

Operating Systems:  It is the interface between the user and the computer hardware. Types of Operating System (OS): Batch OS –  A set of similar jobs are stored in the main memory for execution. A job gets assigned to the CPU, only when the execution of the previous job completes. Multiprogramming OS –  The main memory consists of jobs waiting for CPU time. The OS selects one of the processes and assigns it to the CPU. Whenever the executing process needs to wait for any other operation (like I/O), the OS selects another process from the job queue and assigns it to the CPU. This way, the CPU is never kept idle and the user gets the flavor of getting multiple tasks done at once. Multitasking OS –  Multitasking OS combines the benefits of Multiprogramming OS and CPU scheduling to perform quick switches between jobs. The switch is so quick that the user can interact with each program as it runs Time Sharing OS –  Time-sharing systems require interaction with the user to instruct the OS to