Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


consider the following structure:
struct num nam{
int no;
char name[25];
};
struct num nam
n1[]={{12,"Fred"},{15,"Martin"},{8,"Peter"},{11,Nicholas"}};
.....
.....
printf("%d%d",n1[2],no,(*(n1 + 2),no) + 1);
What does the above statement print?
a.8,9
b.9,9
c.8,8
d.8,unpredictable value

Answers were Sorted based on User's Feedback



consider the following structure: struct num nam{ int no; char..

Answer / jai

Compilation error. Otherwise if rewritten printf statement
is:
printf("%d,%d", n1[2].no, (*(n1+2).no)+1);
then answer is a. 8,9

Is This Answer Correct ?    6 Yes 0 No

consider the following structure: struct num nam{ int no; char..

Answer / santlal kurmi

The correct answer is
a. 8,9
because *(n1+2) means a[2]

Is This Answer Correct ?    4 Yes 0 No

consider the following structure: struct num nam{ int no; char..

Answer / guest

d

Is This Answer Correct ?    3 Yes 0 No

consider the following structure: struct num nam{ int no; char..

Answer / vignesh1988i

the above structure name is an invalid name , since it has encountered a space..... pl. rectify this error, and decleration of array of structure is also not valid...
if this errors are rectified , and we cant refer a structure through ',' operator.... only '.' or -> should be used... so, pl. try to correct it..
the o/p is : 8,9


thank u

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }

20 Answers   Infosys,


There is a number and when the last digit is moved to its first position the resultant number will be 50% higher than the original number.Find the number?

1 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,


If you know then define #pragma?

0 Answers  


develop algorithms to add polynomials (i) in one variable

0 Answers   Ignou, TCS,


Explain what is the difference between far and near ?

0 Answers  


Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250

0 Answers  


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

0 Answers  


What is exit() function?

0 Answers  


How do you print only part of a string?

0 Answers  


Write a program to identify if a given binary tree is balanced or not.

0 Answers   JPMorgan Chase,


Categories