A primary hydrogen is a hydrogen bonded to a primary carbon, and a primary carbon is a carbon that is linked to only 1 other carbon. Since this is an alkane, by definition there can only be single bonds and there are no cyclic loops. This is the only possible alkane with 8 carbons and primary hydrogens:
There are 2 quarternary carbons, 6 primary carbons, and 18 primary hydrogens in this alkane. The two carbons in the middle are quarternary carbons, because they are each bonded to 4 other carbons. The carbons on the outside are all primary carbons, because they are all bonded to only 1 carbon. Each carbon on the outside is bonded to 3 hydrogens, which are primary hydrogens since they are bonded to the primary carbons.
C8H18