edited by
521 views
0 votes
0 votes

 

What is the output of following code?

main ()
struct s1
{ char * z;
int i;
struct s1 * p;
}
static struct s 1 a []}={
    {"Nagpur", 1, a+1}
{"Raipur', 2, a+2}
{"Kanpur', 3, a}
};
struct s 1* ptr =a;
printf (%s %s %s\n", a[0].z. ptr $/rightarrow$ z, a [2]. p $/rightarrow$ z;)

 

  1. Nagpur Raipur Kanpur
  2. Nagpur Nagpur Nagpur
  3. Kanpur Kanpur Kanpur
  4. Error
edited by

1 Answer

Related questions

372
views
0 answers
0 votes
admin asked Jul 28, 2023
372 views
Which of the following statement is correct?Ackermann's function is primitive recursive.$L=\left\{a^{n} b^{k} c^{n+k}: n \geq 0, k \geq 0\right\}$ is ... $\lambda$, there exists some linear bounded automata $M$ such that $L \neq L(M)$.
210
views
0 answers
0 votes
admin asked Jul 28, 2023
210 views
There are $M$ points on one straight line $A B$ and $n$ points on another straight line $A C$ none of them being $A$ ... $m n(m+n-1)$
461
views
1 answers
0 votes
admin asked Jul 28, 2023
461 views
Consider the following statements.The identity is unique in any monoid.A monoid is a group if there exists inverse of each element of monoid.Semi group has closure, associative and ... $\text{C}$ only$\text{A, C}$ and $\text{D}$ only
181
views
1 answers
0 votes
admin asked Jul 28, 2023
181 views
Which of the following scenario may lead to an irrecoverable error in a database system?A transaction writes a data item after it is read by an ... transaction reads a data item after it is written by an uncommitted transaction.