How is a structure member accessed?



How is a structure member accessed?..

Answer / Omkar Shukla

A structure member in C can be accessed using the dot (.) operator or the arrow (->) operator. For example, if struct Student s and its member name is name, they can be accessed as follows: s.name or p->name (where p is a pointer to struct Student).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code????????

2 Answers   Apple,


Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.

11 Answers   Microsoft,


What is substring in c?

1 Answers  


What are actual arguments?

1 Answers  


sum of two integers values only other then integer it should print invalid input.

1 Answers  


How can I read a directory in a C program?

2 Answers   Bright Outdoor, Wipro,


What is the purpose of ftell?

1 Answers  


What's a good way to check for "close enough" floating-point equality?

1 Answers   Celstream,


what is dangling pointer?

1 Answers   LG Soft,


what is the difference between #include<stdio.h> and #include"stdio.h" ?

6 Answers   TCS,


How can I find the day of the week given the date?

0 Answers  


In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]

1 Answers   Infosys,


Categories