Using a density functional approach, we study structural and electronic properties of the 4H(0001)-SiC/SiO2 interface. Through the sequential use of classical and ab initio simulation methods, we generate an abrupt model structure which describes the transition between crystalline SiC and amorphous SiO2 without showing any coordination defect. The first step in our generation procedure consists in identifying suitable interfacial bonding patterns which account for the bond density reduction across the interface. In the second step, the connection to amorphous SiO2 is achieved through classical molecular dynamics. The atomic positions are then relaxed within a generalized gradient approximation of density functional theory. The final model structure shows good structural parameters and an oxide density typical of amorphous SiO2. We investigate the electronic structure of the generated model interface through the local density of states obtained with hybrid density functionals. In our atomically abrupt interface model, the full oxide band gap is recovered at a distance of similar to 5 A from the interface. This extent is in good agreement with estimates derived from internal photoemission measurements and provides support for the abrupt nature of the interface. We obtained band offsets through two different procedures: by evaluating the local density of states and by aligning the band extrema through the local electrostatic potential. Band offsets calculated with various functionals are compared to experimental values. The best agreement is achieved for a hybrid functional in which a screened Coulomb potential is used in the Hartree-Fock exchange term. For this case, the calculated band offsets underestimate the experimental values by similar to 25%, but agree with experiment within a few percent when expressed with respect to the oxide band gap.