Theoretically
class A:8 bits network id, 24 bits host id
and 2$^{8}$ networks are possible and 2$^{24}$ host/networks
class B: 16 bits network id, 16 bits for host id
and 2$^{16}$ networks are possible and 2$^{16}$ host/networks
class C:24 bits for network id,8 bits for host id
and 2$^{24}$ networks are possible and 2$^{8}$
Practically,
when we genarating ranges of ip's we use practical way
class A:2$^{7}$-2 networks are possible and 2$^{24}$-2 host/network
class B:2$^{14}$ networks are possible and 2$^{16}$-2 host/network
class C:2$^{21}$ networks are possible and 2$^{18}$-2 host/network
according to your question you calculated it theoretically
so your answer is 4096
but practical method you get 4094
i.e you calculated as 2$^{12}$ it is theoretical method
practically 2$^{12}$-2 so answer is 4094