Arduino Mega 2560 5v Pins

Only if they are configured for output, a logical '1' is written to them (typically with digitalWrite() ), and an appropriate load is connected (not too much current).

Pin 1 on the Mega is dedicated to serial comms, so isn't a good choice for an output.

You didn't say why you need to know...