The primary issue in this case is whether the introduction of testimony by two co-defendants that they pleaded guilty to charges growing out of the same events for which defendant was being tried constitutes prejudicial error. Having examined the context in which the jury heard this testimony at trial, we hold that the admission of this evidence was not prejudicial error in defendant’s case. We also hold that with respect to defendant’s contentions that the trial court erroneously allowed the State to pursue two irrelevant lines of questioning there was no prejudicial error.
The State’s evidence at trial tended to show the following:
On 8 August 1979, defendant, together with Edward Allen, John McNeill and Eddie “C” Crawford, met at Crawford’s home in the Ebony Trailer Park and planned to rob Roscoe Grice of some money and drugs. Allen testified that the next day defendant handed him a gun as defendant drove to Crawford’s residence to pick up McNeill and Crawford. All four men then went to Grice’s residence in defendant’s car, a blue Camaro. McNeill testified that on the way to Grice’s home, defendant passed him a gun and told him “if the man sees anything, kill him or bump him off.” Allen and Crawford got out of the car and walked down a little road to Grice’s home; defendant and McNeill stayed in the car, drove around for a period, and then returned to pick up Allen and Crawford. When Allen and Crawford got back into the car, Mc-Neill testified that the following conversation took place:
“C” Crawford told Eddie Allen, “You didn’t have to kill him, you could have tied him up.” Eddie Allen said, “When I tell a white punk to shut up that is what I mean.” We went back onto the main Highway 401, and turned left and went past a rest home. There was also a black billfold which “C” Crawford got. Mr. Crawford said that he was going to keep *785the gun [that he had taken from the victim] for a souvenir, or something or other.
At trial, defendant testified as follows:
On 8 August 1979 defendant asked Crawford where he could buy some “reefer.” Crawford indicated that he might be able to buy some for him from Grice. That evening defendant and Crawford periodically went by Grice’s residence to see if he was home so they could buy the marijuana. At about 9 p.m. Crawford told defendant that Grice was at home. Defendant then gave Crawford some money to buy the “reefer.” Crawford later returned and said that Grice did not have any marijuana, but that Grice would call him about it in the morning. The next day, defendant drove the other three to Grice’s residence. McNeill and Allen got out of the car and walked down a path toward Grice’s residence. Defendant and Crawford drove around for a while and then came back. Upon returning to the car, Allen stated that he did not get the “reefer” because Grice would not open the door to him.
The jury convicted defendant of murder in the second degree, robbery with a firearm and conspiracy to commit robbery with a firearm.
As noted previously, defendant contends that the introduction of testimony by two co-defendants, Edward Allen and John McNeill, that they pleaded guilty to charges growing out of the same events for which defendant was being tried constitutes prejudicial error. We do not agree.
In State v. Campbell, 296 N.C. 394, 250 S.E. 2d 228 (1979), this Court reiterated the “clear rule” that “neither a conviction, nor a guilty plea, nor a plea of nolo contendere by one defendant is competent as evidence of the guilt of a codefendant on the same charges.” Id. at 399, 250 S.E. 2d at 230. The rationale underlying this “clear rule” is twofold. This Court has recognized that a defendant’s guilt must be determined solely on the basis of the evidence presented against him. Id.; State v. Cameron, 284 N.C. 165, 168, 200 S.E. 2d 186, 189 (1973), cert. denied, 418 U.S. 905, 94 S.Ct. 3195, 41 L.Ed. 2d 1153 (1974); State v. Kerley, 246 N.C. 157, 159, 97 S.E. 2d 876, 878 (1957). The second reason for the rule is that the introduction of such a plea by a co-defendant, *786 when he or she has not testified at defendant’s trial, would also deprive the defendant of his constitutional right of confrontation and cross-examination. State v. Jackson, 270 N.C. 773, 155 S.E. 2d 236 (1967). See also State v. Cameron, supra.
 As we stated above, evidence of a co-defendant’s guilty plea is not competent as evidence of the guilt of the defendant standing trial. Thus, if such evidence is introduced for that illegitimate purpose — solely as evidence of the guilt of the defendant on trial — it is not admissible. Our case law indicates, however, that if evidence of a testifying co-defendant’s guilty plea is introduced for a legitimate purpose, it is proper to admit it. In State v. Potter, 295 N.C. 126, 244 S.E. 2d 397 (1978), this Court held that it was not error to admit into evidence a co-defendant’s testimony concerning his guilty plea when the State elicited that testimony on redirect examination in order to bolster the witness’ credibility after the defendant, on cross-examination, had called the witness’ credibility into question. In writing for a unanimous Court, Justice Exum reasoned as follows:
Defendant on cross-examination brought out that [the witness] had been treated leniently by the court in return for his plea of guilty ‘to a lesser offense’ and, defendant sought to imply, for his testimony against defendant. It was proper then for the state to place before the jury in bolder relief that crime to which [the witness] had pleaded and for which he had been sentenced in order to show, or at least to be in a position to argue that, under the circumstances, the sentence imposed did fit the crime.
Id. at 136, 244 S.E. 2d at 404.
Thus, the holding in Potter demonstrates that evidence of a testifying co-defendant’s guilty plea is admissible if introduced for a legitimate purpose.
 In the case at bar, defendant has not been deprived of his right of confrontation because both co-defendants testified at trial; defendant had ample opportunity to cross-examine both witnesses. We must determine, therefore, only whether the two co-defendants’ testimony that they pleaded guilty to offenses growing out of the same events for which defendant was being tried was introduced for a legitimate purpose or whether it was *787erroneously admitted because its introduction violates the rationale that a defendant’s guilt must be determined solely on the basis of the evidence presented against him. If such testimony was erroneously admitted, we must then examine the events at trial to decide whether this error was prejudicial to defendant.
In the case at bar, Edward Allen, one of the co-defendants, testified on direct examination as follows:
Q. Mr. Allen, with regard to the death of Mr. Roscoe Grice would you state whether or not you have been charged with anything to that case?
A. Yes, I have.
Q. What were you charged with?
A. I was charged with murder, conspiracy to commit armed robbery and armed robbery.
Q. Have you entered any sort of plea with regard to that case, and if so, when did you make any entry of that plea?
Mr. Thompson: Objection.
The Court: Overruled.
Defendant’s Exception No. l.
BY MR. WEBSTER:
What plea did you make?
A. I made a guilty plea.
From the record it appears that this was the first information about the case that the State elicited from Allen on direct examination. Thus, this part of Allen’s testimony, standing alone, was erroneously admitted into evidence because a legitimate purpose had not yet been established for its introduction at trial. This was not a situation, as was the case in Potter, where such testimony was elicited after the witness’ credibility had been attacked by the defendant. However, as the events at trial unfolded in the case at bar, it is clear that this erroneous admission into evidence was not prejudicial to defendant. After stating that he pleaded guilty to several charges, Allen then testified, as did the witness in State v. Bryant, 236 N.C. 745, 73 S.E. 2d 791 (1953), to *788facts which clearly disclosed his own participation in the crimes for which defendant was being tried. In Bryant, this Court held that it was not prejudicial to defendant for the jury to be apprised of the fact that the testifying witness was pleading guilty to charges arising out of his participation in the crimes for which another defendant was being tried. The Court in Bryant noted that because the witness had testified to his own participation in the crime, “[t]he jury was already fully apprized of [the testifying witness’] guilt.” Id. at 747, 73 S.E. 2d at 792. We hold that the same result must be reached here. This is not a situation, as was the case in State v. Kerley, supra, 246 N.C. 157, 97 S.E. 2d 876, where the prosecutor used as evidence the non-testifying co-defendant’s guilty plea to support his argument to the jury that the defendant on trial was also guilty.
 Defendant’s arguments concerning the testimony of the second co-defendant, John McNeill, are more tenuous. On cross-examination McNeill testified that he “pleaded guilty of riding in the car.” Defendant apparently contends that although the trial court sustained his objections to McNeill’s testimony that he pleaded guilty to “riding in the car,” he was prejudiced by the court’s failure to grant his motion to strike this answer. We fail to see any prejudicial error here. McNeill testified to his particular role in the Grice murder: he stayed in the car while two. others went to Grice’s home. The jury, thus, was fully aware of the import of McNeill’s comment that he pleaded guilty to “riding in the car.” Indeed, at the outset of his cross-examination of McNeill, defense counsel elicited from McNeill the admission that “I plead guilty to second degree murder, to conspiracy to commit robbery, and armed robbery” for the events which occurred at Grice’s home. In sum, we find no prejudicial error with respect to the challenged testimony of either co-defendant.
Defendant also contends that he is entitled to a new trial because the trial court erroneously allowed two irrelevant lines of questioning to be pursued which resulted in prejudice to him. We disagree.
 The first line of questioning concerns the direct examination of Officer L. E. Smith who testified that on 31 August 1979 a *789silver Monte Carlo, driven by defendant’s mother, was stopped because an “alert” had been put out for it in the course of an investigation. The car was then impounded because it was not properly registered. In conducting an inventory of the contents of the car, a gun was found underneath the front seat of the car. Defendant later arrived at the police department driving a gold El Dorado Cadillac. Officer Smith testified that defendant got out of the El Dorado, “went to the Monte Carlo and opened the door on the passenger side, stooped over and looked into the floorboard of the car, immediately stood back up, closed the door and went very quickly to the El Dorado.” After Smith and another officer called to defendant to tell him they needed to talk to him, he jumped into the El Dorado and left the parking lot. The police then chased defendant for several blocks, after which defendant returned to the municipal building. Another officer, Franklin Poe, testified that defendant “was sweating heavily” when he was informed that the weapon had been removed from the car.
Defendant complains that the above testimony was not competent — that it was introduced to show defendant was guilty of a crime separate and distinct from the crimes for which he was currently being tried, and thus, prejudiced the jury against him. We hold, however, for the reasons discussed below, that this evidence concerning defendant’s flight from the parking lot was competent.
In State v. Jones, 292 N.C. 513, 234 S.E. 2d 555 (1977), this Court stated that “[i]n North Carolina it has long been held that ‘[subsequent acts, including flight . . . are competent on the question of guilt. [Citations omitted.] The basis of this rule is that a guilty conscience influences conduct.’ ” Id. at 525, 234 S.E. 2d at 562. (Citations omitted.) This Court also stated that evidence of flight is admissible even though that evidence may disclose the commission of a separate crime by the defendant. Id. at 526, 234 S.E. 2d at 562. (Citations omitted.) At trial, defendant admitted to owning State’s Exhibit 10, the gun found in his car. Edward Allen also identified State’s Exhibit 10 as the weapon defendant gave him while driving to Crawford’s residence to pick up the other two men before they proceeded to Grice’s home on 9 August 1979. He also testified that this was the same weapon which he returned to defendant after they left Grice’s home. Although the evidence at trial indicated that defendant’s weapon was not the murder weapon, the officers’ testimony was competent and rele*790vant to show the existence of the weapon which Allen took with him when he went to Grice’s home on the day Grice was murdered. See State v. Carnes, 279 N.C. 549, 553, 184 S.E. 2d 235, 237-38 (1971) (defendant’s loaded pistol which was available but not used during robbery would seem to be relevant evidence at trial). See also Moore v. Illinois, 408 U.S. 786, 798-800, 92 S.Ct. 2562, 2570, 33 L.Ed. 2d 706, 715-16 (1972). The officers’ testimony also corroborates Allen’s testimony that he returned to defendant the gun which defendant had given him on the day of Grice’s murder. Thus, under this Court’s holding in Jones, the officers’ testimony about defendant’s flight — defendant’s reaction after he was informed that this gun, which apparently had been used in the commission of the crimes committed at Grice’s home, had been removed from his car by the police — clearly was admissible.
 Defendant also contends that a second line of questioning which elicited testimony by Deputy Sheriff Charles Buffkin that he saw a gold El Dorado Cadillac leaving the Ebony Trailer Park about 5 p.m. on 8 August 1979 while he was there to serve a warrant on a man who was with Crawford and another male constitutes prejudicial error. We cannot agree.
Defendant admitted at trial that he was at Crawford’s home at the trailer park on that day, but that he left at about 4:30 in another car, his silver Monte Carlo. Defendant essentially claims that the officer’s statements concerning his reason for being at the trailer park — that the officer was at the trailer park to “serve a warrant” — were admitted only to show “by innuendo the defendant’s association with another criminal.” We agree that the officer’s statement as to his reason for being at the trailer park was irrelevant and therefore should not have been admitted. However, we do not find that this error was prejudicial to defendant such that there is a reasonable possibility that a different result would have been reached at trial had the jury not heard this comment. N.C.G.S. § 15A-1443(a) (1978). As this Court stated in State v. Williams, 275 N.C. 77, 165 S.E. 2d 481 (1969), “[w]here there is abundant evidence to support the main contentions of the state, the admission of evidence, even though technically incompetent, will not be held prejudicial when defendant does not affirmatively make it appear that he was prejudiced thereby or that the *791admission of the evidence could have affected the result.” Id. at 89, 165 S.E. 2d at 489, quoting 3 Strong’s, North Carolina Index 2d, Criminal Law § 169, p. 135. We are confident that, given the substantial evidence of defendant’s guilt, the jury was not prone to convict defendant simply on the basis of this cursory reference to defendant’s possible association with a man being sought for arrest. Thus, we hold that this error was not prejudicial to defendant.
In conclusion, therefore, we find that defendant’s trial was free of prejudicial error.