In Ubuntu 18.4 I enrolled in a QGIS course in that course .dem file shows but .ecw can not show so what can be the solution can anybody tell me. QGIS version is 3.10.
While ecw is supported by default with the QGIS Windows installers, you have to add it manually on ubuntu due to license problems.
You have to compile GDAL yourself with ECW support, using exactly the same GDAL version as your non-ECW build of QGIS has. Otherwise you would need to recompile QGIS too.
See this topic for a start: