An electronic device comprising: a housing including a front cover, a rear cover and a frame positioned between the front cover and the rear cover; a first input/output (I/O) device (115, 793) disposed in a first area of the electronic device; a second I/O device (117, 795) disposed in a second area of the electronic device; a gap formed between the frame and the front cover or the rear cover and forms a passage that transfers a sound from the first I/O device or the second I/O device to an outside of the electronic device; an I/O control module; and a display that is functionally connected with the I/O control module; wherein the I/O control module is configured to: determine situation information for a user who handles the electronic device; execute a function through the first I/O device (115, 793) in response to an input when the situation information is first situation information; execute the function through the second I/O device (117, 795) when the situation information is second situation information, display a representation that indicates a function or a position of a corresponding I/O device among the first I/O device and the second I/O device on the display, acquire an input from the user through the representation, and change the function or the position of the corresponding I/O device in response to the input from the user; wherein the front cover, the rear cover and the frame are directly exposed to the outside of the electronic device without a hole, wherein at least a part of the gap is covered by a mesoporous material that forms at least a part of the exterior of the electronic device, wherein the sound is transferred through the mesoporous material to the outside of the electronic device, wherein the I/O control module is configured to determine the situation information at least partially based on information that is acquired through at least one sensor that is functionally connected with the electronic device, and wherein the situation information is set to include at least one of: a distance between the electronic device and the user, an electronic device orientation with reference to the user, and one of approaching and non-approaching of an external device. a housing including a front cover, a rear cover and a frame positioned between the front cover and the rear cover; a first input/output (I/O) device (115, 793) disposed in a first area of the electronic device; a second I/O device (117, 795) disposed in a second area of the electronic device; a gap formed between the frame and the front cover or the rear cover and forms a passage that transfers a sound from the first I/O device or the second I/O device to an outside of the electronic device; an I/O control module; and a display that is functionally connected with the I/O control module; wherein the I/O control module is configured to: determine situation information for a user who handles the electronic device; execute a function through the first I/O device (115, 793) in response to an input when the situation information is first situation information; execute the function through the second I/O device (117, 795) when the situation information is second situation information, display a representation that indicates a function or a position of a corresponding I/O device among the first I/O device and the second I/O device on the display, acquire an input from the user through the representation, and change the function or the position of the corresponding I/O device in response to the input from the user; determine situation information for a user who handles the electronic device; execute a function through the first I/O device (115, 793) in response to an input when the situation information is first situation information; execute the function through the second I/O device (117, 795) when the situation information is second situation information, display a representation that indicates a function or a position of a corresponding I/O device among the first I/O device and the second I/O device on the display, acquire an input from the user through the representation, and change the function or the position of the corresponding I/O device in response to the input from the user; wherein the front cover, the rear cover and the frame are directly exposed to the outside of the electronic device without a hole, wherein at least a part of the gap is covered by a mesoporous material that forms at least a part of the exterior of the electronic device, wherein the sound is transferred through the mesoporous material to the outside of the electronic device, wherein the I/O control module is configured to determine the situation information at least partially based on information that is acquired through at least one sensor that is functionally connected with the electronic device, and wherein the situation information is set to include at least one of: a distance between the electronic device and the user, an electronic device orientation with reference to the user, and one of approaching and non-approaching of an external device.