struct complex {mutable int x; int y;}; const complex Mycomplex = {1, 2}; Mycomplex.x = 3; /* correct */Yes, a status register for a microcontroller is an example.
Use two pointers. One increments by one element at a time, and the other increments by two. If the list is circular, the pointer incrementing by two will eventually overlap with the first pointer.
Consider the following macro definition:
#define res(a) a*a
Using it in this form may lead to unexpected results. For example, if 'a' is replaced with (2+3), the result will be 2+3*2+3 = 11, not (2+3)*(2+3) = 25.
Always use parentheses for safety: #define res(a) (a)*(a).
A dangling pointer is obtained by using the address of an object that has already been freed.
const int* ptr and int *const ptr?Yes, there is a major difference. The first defines a pointer to constant data, and the second defines a constant pointer.
A definition provides the implementation for a variable or function. A declaration makes a variable or function known to the compiler without providing its implementation.
Consider the following recursive function:
c func_call() { func_call(); }
Every time the function is called, the return address is stored on the stack. This infinite recursion will eventually cause a stack overflow. A solution involves ensuring that all recursive functions have a proper base case to terminate the recursion.
while (1) {} * for (;;) {} * do {} while (1); * c
label:
goto label;What is the difference between the DES and RSA algorithms?
The following metrics were computed from 125 interview experiences for the Cisco Software Engineer role in San Jose, California.
Cisco's interview process for their Software Engineer roles in San Jose, California is on the easier side as most engineers get an offer after going through it.
Candidates reported having very good feelings for Cisco's Software Engineer interview process in San Jose, California.