Final answer:
Tony's use of a New York accent when speaking with friends from New York City while attending ECU is an example of code-switching, a sociolinguistic concept involving alternating between languages or dialects based on social context.
Step-by-step explanation:
When Tony speaks with a New York accent while talking to his friends from New York City, even though he is an ECU student, this behavior is an example of code-switching. Code-switching is a sociolinguistic concept where a speaker alternates between two or more languages or dialects, depending on the social context or conversational setting. This phenomenon occurs as a means to conform to cultural expectations, to facilitate communication, or to express a facet of their identity that is connected to a particular language or dialect.
Code-switching is sometimes conflated with diglossia, but they are not the same. Diglossia refers to a situation where two dialects or languages are used by a single language community but in different contexts, not so much interchangeably but as a matter of social norm or function.
Therefore, Tony's use of the New York accent with friends from his hometown represents code-switching, which is a common behavior among bilingual or multilingual speakers, or individuals who can switch between dialects of the same language.