Placement Papers - Cisco

Why Cisco Placement Papers?

Learn and practice the placement papers of Cisco and find out how much you score before you appear for your next interview and written test.

Where can I get Cisco Placement Papers with Answers?

IndiaBIX provides you lots of fully solved Cisco Placement Papers with answers. You can easily solve all kind of placement test papers by practicing the exercises given below.

How to solve Cisco Placement Papers?

You can easily solve all kind of questions by practicing the following exercises.

CISCO - 27Apr2012

Posted By : David Rajesh Rating : +32, -42
Hi all, I attended Cisco interview for STB Development in C, RTOS, DVB.

They asked the below questions as,

Get an IP address in char * and store it in uint32 variable and display with '.' sysmbol. I worked out and find the below program for your knowledge.

/* Convert IP address Char array to integer array using strtok */

#include<stdio.h>
int main()
{
 char acIPAddr[ 16 + 1 ] = "121.122.123.124";
 unsigned int aui32IPAddr[ 4 ];

 unsigned int i = 0;

 aui32IPAddr[0] = atoi( strtok( acIPAddr, "." ) );

 for(i=1; i!=4; i++)
 {
   aui32IPAddr[ i ] = atoi( strtok(NULL, ".") );
 }

 printf("IPAddr[%d.%d.%d.%d]\n", aui32IPAddr[0], aui32IPAddr[1], aui32IPAddr[2], aui32IPAddr[3] );

 return 0;
}


/* Convert IP address char * to uint32 using sscanf */

#include<stdio.h>
int main()
{
   char * pacIPAddress;
   unsigned int aui8IPAddr[4], i;
   unsigned long int ui32IPAddress;

   pacIPAddress = ( char *) malloc ( sizeof(char) * 16 + 1 );

   pacIPAddress = "121.122.123.124";
   
   sscanf ( pacIPAddress, "%d.%d.%d.%d", &aui8IPAddr[0], &aui8IPAddr[1], &aui8IPAddr[2], &aui8IPAddr[3] );

   ui32IPAddress = ( ( aui8IPAddr[0] << 24 ) | ( aui8IPAddr[1] << 16 ) | ( aui8IPAddr[2] << 8 ) | aui8IPAddr[3] );

   printf ( "ui32IPAddress[%d]\n", ui32IPAddress );

   for ( i=0; i<4; i++ )
   {
       aui8IPAddr[i] = ( ui32IPAddress >> (i*8) ) & 0xFF;
   }

   printf("IP Addr in Interger[%d].[%d].[%d].[%d]\n", aui8IPAddr[3], aui8IPAddr[2], aui8IPAddr[1], aui8IPAddr[0] );

   return 0;
}

Like this page? +32 -42




Companies List:

3i Infotech - AAI - ABACUS - ABB - Accel Frontline - Accenture - Aditi - Adobe - ADP - Agreeya - Akamai - Alcatel Lucent - Allfon - Alumnus - Amazon - Amdocs - AMI - Andhra Bank - AppLabs - Apps Associates - Aricent - Ashok Leyland - Aspire - Atos Origin - Axes - Bajaj - Bank of Maharashtra - BEL - BEML - BHEL - BirlaSoft - Blue Dart - Blue Star - BOB - BPCL - BPL - Brakes - BSNL - C-DOT - Cadence - Calsoft - Canara Bank - Canarys - Capgemini - Caritor - Caterpillar - CDAC - CGI - Changepond - Ciena - Cisco - Citicorp - CMC - Consagous - Convergys - CORDYS - Crompton - CSC - CTS - Cummins - Dell - Deloitte - Delphi-TVS - DeShaw - Deutsche - Dotcom - DRDO - EDS - EIL - ELGI - ELICO - ERICSSON - Essar - Fidelity - Flextronics - Freescale - FXLabs - GAIL - GE - Genpact - Geodesic - Geometric - Globaledge - GlobalLogic - Godrej - Google - Grapecity - HAL - HCL - Hexaware - Honeywell - HP - HPCL - HSBC - Huawei - Hughes - IBM - IBS - ICICI - iGate - Impetus - iNautix - Indian Airforce - Indian Airlines - Infosys - Infotech - Intec - Integra - Intergraph - IOCL - iSOFT - ISRO - Ittiam - JSW - Keane - Kenexa - L & T - L & T Infotech - LG Soft - Lifetree - LionBridge - Mahindra Satyam - Mastek - Maveric - McAfee - MECON - Microsoft - MindTree - Miraclesoft - Mistral - Motorola - Mphasis - MTNL - NIC - Nokia Siemens - Novell - NTPC - Nucleus - ORACLE - Patni - Perot - Polaris - Ramco - Robert Bosch - Samsung - SAP - Sapient - Sasken - SBI - Sierra Atlantic - Sonata - Sony India - Sutherland - Syntel - TCS - Tech Mahindra - VeriFone - Virtusa - Wipro - Zensar.