Broadcom Ltd Interview Questions and Answers for 10 years Experience
Home > Experience Archives > Broadcom Ltd > Interview Question Set 2
Accenture
Adobe
Alcatel-Lucent
Alten Calsoft Lab
Amazon
Amdocs
Aricent
Arris
Broadcom Ltd
Brocade
CA Technologies
Capgemini
Cavium Networks
CenturyLink
Ciena
Cisco
Citrix
Cognizant
Comcast
CSC (DXC Technology)
Dell EMC
Deloitte
EFI
Ericsson
Extreme Network
Genpact
Gigamon
Global Edge
GlobalLogic
Goldman Sachs
Happiest Minds
HCL Technologies
Hewlett Packard Enterprise
IDS Infotech
Incedo
Infinite C S
IpInfusion
J.P. Morgan
Juniper Network
L&T Technology Services
MindTree
MosChip Semiconductor
NEC Technologies
NIIT Technologies
OLA
One Access
PayPal
Paytm
Qualcomm
Radisys
Redeem Software
Reliance Jio
Rolta India Limited
Samsung
Sasken
Siemens
Synopsys
Tavant Technologies
TCS
Tech Mahindra
Viasat
Wipro
XiLinx
C (37)
C++ (0)
DBMS (1)
Soft. Engineering (0)
Python (0)
Finite Automata (0)
SQL (55)
Java (24)
.NET (0)
WebMethod (0)
EDI (0)
Informatica (0)
Oracle Apps HRMS (0)
Operating System (17)
Data Structure (19)
PHP (0)
Unica (8)
Oracle Apex (7)
HR Question in TR (32)
Networking (56)
Hadoop (0)
HTML (0)
Oracle PLSQL (0)
DPDK (Data Plane Development Kit) (1)
Programming Qs. in TR (0)
Telephonic Round
1 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
2 / 11
int arr[100];
int *ptr;
/* do something here*/
ptr++; // This should incrememnt ptr value by 10 location.
|
|
|
Answer:
int main(){
int x=3;
int *ptr=&x;
printf("%d\n", ptr);
char *p = (char*)ptr;
p+=10; //increments pointer by 10 bytes
ptr = (int *)p;
printf("%d\n",ptr);
}
Please Login First :
Tags:
No Tags on this question yet!
3 / 11
|
|
|
Answer:
http://www.firmcodes.com/structure-padding-and-packing-in-c-example/
Please Login First :
Tags:
No Tags on this question yet!
4 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
5 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
6 / 11
int *ptr = (int *)malloc (0);
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
7 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
8 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
9 / 11
|
|
|
Answer:
int * (*fun)(int *,int *)
int * (*fun)(int *,int *)
Please Login First :
Tags:
No Tags on this question yet!
10 / 11
|
|
|
Answer:
No Discussion on this question yet!
No Discussion on this question yet!
Please Login First :
Tags:
No Tags on this question yet!
11 / 11
|
|
|
Answer:
typedef struct size_t
{
unsigned x:1;
} size_1;
Where you have told the compiler that you'll only be using one bit of x.
But due to structure packing arrangements (the C standard is intentionally flexible in order that compilers can optimize according to the machine architecture), it may well turn out that this still occupies as much space in memory as a regular unsigned and an array of size_1 doesn't have to be bitwise contiguous.
Generally, the smallest addressable chunk of data in C is a byte. You can not have a pointer to a bit, so you can not declare a variable of 1 bit size, But above can be one way to have 1 bit size.
Please Login First :
Tags:
No Tags on this question yet!